chore(ts-autotag, statusline, colorscheme, lsp): removed

nvim-ts-autotag, minimized statusline, updated keymaps and lsp
This commit is contained in:
DarthMooMancer committed 2026-11-02 01:16:20 -05:00
1 parent d6e031bfb4
commit 6d054a27c5
11 files changed
+205 -179

No files matched your search

-1
View File
@@ -316,7 +316,6 @@ set_highlights({
['@comment.error'] = { fg = theme.ui.fg, bg = theme.diag.error, bold = true }, ['@comment.error'] = { fg = theme.ui.fg, bg = theme.diag.error, bold = true },
['@comment.warning'] = { fg = theme.ui.fg_reverse, bg = theme.diag.warning, bold = true }, ['@comment.warning'] = { fg = theme.ui.fg_reverse, bg = theme.diag.warning, bold = true },
['@comment.note'] = { fg = theme.ui.fg_reverse, bg = theme.diag.hint, bold = true }, ['@comment.note'] = { fg = theme.ui.fg_reverse, bg = theme.diag.hint, bold = true },
-- ['@comment.documentation'] = { link = '@tag' },
['@markup.strong'] = { bold = true }, ['@markup.strong'] = { bold = true },
['@markup.italic'] = { italic = true }, ['@markup.italic'] = { italic = true },
['@markup.strikethrough'] = { strikethrough = true }, ['@markup.strikethrough'] = { strikethrough = true },
@@ -2,45 +2,108 @@ local map = vim.keymap.set
map('v', 'J', ":m '>+1<CR>gv=gv") map('v', 'J', ":m '>+1<CR>gv=gv")
map('v', 'K', ":m '<-2<CR>gv=gv") map('v', 'K', ":m '<-2<CR>gv=gv")
map('n', '<leader>ff', function()
require('conform').format({ async = true, lsp_format = 'never' })
end)
map('n', '<leader>vs', ':vsplit<CR>')
map('n', '<leader>ss', ':split<CR>')
map('n', '<C-u>', '<C-u>zz') map('n', '<C-u>', '<C-u>zz')
map('n', '<C-d>', '<C-d>zz') map('n', '<C-d>', '<C-d>zz')
map('n', 'n', 'nzzzv') map('n', 'n', 'nzzzv')
map('n', 'N', 'Nzzzv') map('n', 'N', 'Nzzzv')
map('x', '<leader>p', [["_dP]]) map('x', '<leader>p', [["_dP]])
map('n', '<leader><leader>', function()
Snacks.picker.files() map('n', '<leader>vs', ':vsplit<CR>')
end) map('n', '<leader>ss', ':split<CR>')
map('n', '<leader>fh', function() map('n', '<leader>[', '<c-w>H', { silent = true })
Snacks.picker.help() map('n', '<leader>]', '<c-w>K', { silent = true })
end)
map('n', '<leader>fg', function() map('n', '<C-h>', '<C-w>h', { silent = true })
Snacks.picker.grep() map('n', '<C-j>', '<C-w>j', { silent = true })
end) map('n', '<C-k>', '<C-w>k', { silent = true })
map('n', '<leader>uu', function() map('n', '<C-l>', '<C-w>l', { silent = true })
Snacks.picker.undo()
end)
map('n', '<leader>E', ':Ex<CR>') map('n', '<leader>E', ':Ex<CR>')
map('n', '<leader>lp', '<cmd>LivePreview pick<cr>')
map('n', '<leader><leader>', function()
require('snacks.picker').files()
end)
map('n', '<leader>fh', function()
require('snacks.picker').help()
end)
map('n', '<leader>fg', function()
require('snacks.picker').grep()
end)
map('n', '<leader>uu', function()
require('snacks.picker').undo()
end)
map('n', '<leader>zz', function()
require('snacks.zen').zen()
end)
map('n', '<leader>ff', function()
require('conform').format({ async = true, lsp_format = 'never' })
end)
map('n', '<leader>fs', vim.lsp.buf.document_symbol) map('n', '<leader>fs', vim.lsp.buf.document_symbol)
map('n', '<leader>gd', vim.lsp.buf.definition) map('n', '<leader>gd', vim.lsp.buf.definition)
map('n', '<leader>gr', vim.lsp.buf.references) map('n', '<leader>gr', vim.lsp.buf.references)
map('n', '<leader>gR', vim.lsp.buf.rename) map('n', '<leader>gR', vim.lsp.buf.rename)
map('n', '<leader>gc', vim.lsp.buf.code_action) map('n', '<leader>gc', vim.lsp.buf.code_action)
map('n', '<leader>[', '<c-w>H', { silent = true, noremap = true })
map('n', '<leader>]', '<c-w>K', { silent = true, noremap = true })
map('n', '<leader>lp', '<cmd>LivePreview pick<cr>')
map('n', '<C-h>', '<cmd>NvimTmuxNavigateLeft<CR>', { silent = true })
map('n', '<C-j>', '<cmd>NvimTmuxNavigateDown<CR>', { silent = true })
map('n', '<C-k>', '<cmd>NvimTmuxNavigateUp<CR>', { silent = true })
map('n', '<C-l>', '<cmd>NvimTmuxNavigateRight<CR>', { silent = true })
map('n', '<leader>xx', function() map('n', '<leader>xx', function()
vim.diagnostic.jump({ count = 1, float = false }) local qf_open = false
end) for _, win in ipairs(vim.fn.getwininfo()) do
map('n', '<leader>zz', function() if win.quickfix == 1 then
Snacks.zen() qf_open = true
end) break
end
end
if qf_open then
vim.cmd('cclose')
else
vim.diagnostic.setqflist()
if #vim.fn.getqflist() == 0 then
vim.notify('No diagnostics found', vim.log.levels.WARN)
else
vim.cmd('copen')
end
end
end, { desc = 'Toggle Diagnostics Quickfix' })
local qf_group = vim.api.nvim_create_augroup('QuickFixDiagnostics', { clear = true })
vim.api.nvim_create_autocmd('DiagnosticChanged', {
group = qf_group,
callback = function()
vim.schedule(function()
local qf_open = false
for _, win in ipairs(vim.fn.getwininfo()) do
if win.quickfix == 1 then
qf_open = true
break
end
end
if qf_open then
local diagnostics = vim.diagnostic.get()
local qf_items = vim.diagnostic.toqflist(diagnostics)
vim.fn.setqflist(qf_items, 'r')
if #qf_items == 0 then
vim.cmd('cclose')
vim.notify('No diagnostics found', vim.log.levels.WARN)
end
end
end)
end,
})
vim.api.nvim_create_autocmd('FileType', {
group = qf_group,
pattern = 'qf',
callback = function()
vim.schedule(function()
if vim.fn.getqflist({ size = 0 }).size == 0 then
vim.cmd('cclose')
end
end)
end,
})
+55 -6
View File
@@ -30,11 +30,61 @@ vim.lsp.config('lua_ls', {
vim.lsp.config('vtsls', { vim.lsp.config('vtsls', {
settings = { settings = {
-- Control memory allocation for large TypeScript projects
vtsls = {
autoUseWorkspaceTsdk = true,
experimental = {
completion = {
enableServerSideFuzzyMatch = true,
},
},
},
typescript = { typescript = {
-- Performance: limit automatic project scanning depth
tsserver = {
maxTsServerMemory = 8192,
},
updateImportsOnFileMove = { enabled = 'always' },
-- Comprehensive inlay hints configuration
inlayHints = {
parameterNames = { enabled = 'all', suppressWhenArgumentMatchesName = true },
parameterTypes = { enabled = true },
variableTypes = { enabled = true },
propertyDeclarationTypes = { enabled = true },
functionLikeReturnTypes = { enabled = true },
enumMemberValues = { enabled = true },
},
-- Auto-import formatting preferences
preferences = {
importModuleSpecifier = 'non-relative',
},
},
-- Mirror settings for JavaScript files
javascript = {
updateImportsOnFileMove = { enabled = 'always' }, updateImportsOnFileMove = { enabled = 'always' },
inlayHints = { inlayHints = {
parameterNames = { enabled = 'all' }, parameterNames = { enabled = 'all', suppressWhenArgumentMatchesName = true },
parameterTypes = { enabled = true },
variableTypes = { enabled = true }, variableTypes = { enabled = true },
propertyDeclarationTypes = { enabled = true },
functionLikeReturnTypes = { enabled = true },
enumMemberValues = { enabled = true },
},
},
},
})
vim.lsp.config('rust_analyzer', {
settings = {
['rust-analyzer'] = {
cargo = {
allFeatures = true, -- Enable all cargo features
},
check = {
command = 'clippy', -- Use clippy for errors/warnings on save
},
diagnostics = {
enable = true,
}, },
}, },
}, },
@@ -44,9 +94,8 @@ vim.lsp.enable({
'lua_ls', 'lua_ls',
'clangd', 'clangd',
'pylsp', 'pylsp',
-- 'rust-analyzer', 'rust_analyzer',
-- 'vtsls', 'vtsls',
-- 'tailwindcss-language-server', -- 'vscode-html-language-server',
-- 'cssls', 'superhtml',
-- 'html',
}) })
+31 -27
View File
@@ -1,43 +1,47 @@
vim.opt.termguicolors = true
vim.g.mapleader = ' ' vim.g.mapleader = ' '
vim.opt.number = true vim.opt.nu = true
vim.opt.relativenumber = true vim.opt.relativenumber = true
vim.opt.colorcolumn = '100'
vim.opt.hlsearch = false
vim.opt.undofile = true
vim.opt.swapfile = false
vim.opt.termguicolors = true
vim.opt.signcolumn = 'yes'
vim.opt.wrap = false
vim.opt.showmode = false
vim.o.winborder = 'rounded'
vim.opt.scrolloff = 15
vim.opt.sidescrolloff = 15
vim.opt.smoothscroll = true
vim.opt.updatetime = 50
vim.opt.smartindent = true
local shifts = { local shifts = {
lua = 4, lua = 4,
python = 4, python = 4,
rust = 4, rust = 4,
dart = 2,
html = 2, html = 2,
javascript = 2, javascript = 2,
typescript = 2, typescript = 2,
} }
vim.api.nvim_create_autocmd('FileType', { vim.api.nvim_create_autocmd('FileType', {
group = vim.api.nvim_create_augroup('IndentSettings', { clear = true }),
pattern = vim.tbl_keys(shifts), pattern = vim.tbl_keys(shifts),
callback = function(ev) callback = function(ev)
local size = shifts[ev.match] local size = shifts[ev.match]
vim.bo[ev.buf].tabstop = size local bo = vim.bo[ev.buf]
vim.bo[ev.buf].shiftwidth = size bo.tabstop = size
vim.bo[ev.buf].softtabstop = size bo.shiftwidth = size
vim.bo[ev.buf].expandtab = true bo.softtabstop = size
bo.expandtab = true
end, end,
}) })
vim.opt.wrap = false
vim.opt.swapfile = false vim.diagnostic.config({
vim.opt.signcolumn = 'number' -- virtual_text = true,
vim.opt.undofile = true -- Keeps undo history even after we close a file virtual_lines = true,
vim.opt.scrolloff = 15 severity_sort = true,
vim.opt.sidescrolloff = 15 })
vim.opt.hlsearch = false
vim.opt.cursorline = true -- enable cursorline
vim.opt.cursorlineopt = { 'screenline', 'number' } -- cursorline look
vim.g.netrw_browse_split = 0
vim.g.netrw_banner = 0
vim.g.netrw_liststyle = 3
vim.g.netrw_winsize = 25
vim.opt.showmode = false
vim.opt.smoothscroll = true
vim.diagnostic.config({ severity_sort = true })
vim.o.winborder = 'rounded'
vim.opt.updatetime = 250
@@ -2,7 +2,6 @@ vim.pack.add({
{ src = 'https://github.com/folke/snacks.nvim' }, { src = 'https://github.com/folke/snacks.nvim' },
{ src = 'https://github.com/nvim-mini/mini.nvim.git', version = vim.version.range('*') }, { src = 'https://github.com/nvim-mini/mini.nvim.git', version = vim.version.range('*') },
{ src = 'https://github.com/nvim-treesitter/nvim-treesitter' }, { src = 'https://github.com/nvim-treesitter/nvim-treesitter' },
{ src = 'https://github.com/windwp/nvim-ts-autotag' },
{ src = 'https://github.com/saghen/blink.cmp', version = vim.version.range('*') }, { src = 'https://github.com/saghen/blink.cmp', version = vim.version.range('*') },
{ src = 'https://github.com/folke/lazydev.nvim' }, { src = 'https://github.com/folke/lazydev.nvim' },
{ src = 'https://github.com/mason-org/mason.nvim' }, { src = 'https://github.com/mason-org/mason.nvim' },
@@ -10,25 +9,11 @@ vim.pack.add({
{ src = 'https://github.com/neovim/nvim-lspconfig' }, { src = 'https://github.com/neovim/nvim-lspconfig' },
{ src = 'https://github.com/stevearc/conform.nvim' }, { src = 'https://github.com/stevearc/conform.nvim' },
{ src = 'https://git.moomancer.xyz/DarthMooMancer/mason-conform.nvim.git' }, { src = 'https://git.moomancer.xyz/DarthMooMancer/mason-conform.nvim.git' },
{ src = 'https://github.com/alexghergh/nvim-tmux-navigation' },
{ src = 'https://github.com/brianhuster/live-preview.nvim' }, { src = 'https://github.com/brianhuster/live-preview.nvim' },
{ src = 'https://github.com/rachartier/tiny-inline-diagnostic.nvim' },
}) })
vim.opt.rtp:append('/Users/andrew/personal/Projects/Lua/vern-nvim') vim.opt.rtp:append('/Users/andrew/personal/Projects/Lua/vern-nvim')
require('nvim-tmux-navigation').setup({
disable_when_zoomed = true, -- defaults to false
})
require('tiny-inline-diagnostic').setup({
preset = 'minimal',
options = {
multilines = {
enabled = true,
always_show = true,
},
},
})
require('DarthMooMancer.plugins.blink-cmp') require('DarthMooMancer.plugins.blink-cmp')
require('DarthMooMancer.plugins.mini-nvim') require('DarthMooMancer.plugins.mini-nvim')
require('DarthMooMancer.plugins.vern') require('DarthMooMancer.plugins.vern')
@@ -8,6 +8,7 @@ require('conform').setup({
c = { 'clang-format' }, c = { 'clang-format' },
cpp = { 'clang-format' }, cpp = { 'clang-format' },
python = { 'ruff_fix', 'ruff_format' }, python = { 'ruff_fix', 'ruff_format' },
rust = { 'rustfmt' },
['_'] = { 'trim_whitespace' }, ['_'] = { 'trim_whitespace' },
}, },
format_on_save = { format_on_save = {
@@ -2,37 +2,14 @@ require('snacks').setup({
notifier = { notifier = {
enabled = true, enabled = true,
}, },
animate = { enabled = true },
input = { enabled = true }, input = { enabled = true },
picker = { picker = {
enabled = true, enabled = true,
prompt = '', prompt = '',
icons = {
ui = {
selected = '',
},
},
},
dim = {
scope = {
min_size = 3, -- Lower minimum so short loops/branches don't get ignored
max_size = 40, -- Allow slightly larger blocks (functions/structs) to stay lit
siblings = false, -- Set to false so only the exact active scope is highlighted
},
animate = {
enabled = vim.fn.has('nvim-0.10') == 1,
easing = 'outCubic',
duration = {
step = 15, -- ms per step
total = 180, -- maximum duration
},
},
}, },
zen = { zen = {
enabled = true, enabled = true,
toggles = { toggles = {
dim = true,
diagnostics = true, diagnostics = true,
inlay_hints = false, inlay_hints = false,
}, },
@@ -4,6 +4,7 @@ local parsers = {
'c', 'c',
'cpp', 'cpp',
'lua', 'lua',
'html',
'javascript', 'javascript',
'typescript', 'typescript',
'tsx', 'tsx',
@@ -14,14 +15,6 @@ local parsers = {
} }
require('nvim-treesitter').install(parsers) require('nvim-treesitter').install(parsers)
require('nvim-ts-autotag').setup({
opts = {
enable_close = true, -- Auto close tags
enable_rename = true, -- Auto rename pairs of tags
enable_close_on_slash = false, -- Auto close on trailing </
},
})
local group = vim.api.nvim_create_augroup('UserTreesitter', { clear = true }) local group = vim.api.nvim_create_augroup('UserTreesitter', { clear = true })
vim.api.nvim_create_autocmd('FileType', { vim.api.nvim_create_autocmd('FileType', {
@@ -1,5 +1,8 @@
require('vern-nvim').setup({ require('vern-nvim').setup({
workspace_root = '~/personal/Projects_Testing', workspace_root = '~/personal/Projects_Testing',
env = {
author = 'DarthMooMancer',
},
c = { c = {
templates = { templates = {
extras = { extras = {
@@ -1,71 +1,35 @@
local icon_cache = {} local ok, mini_icons = pcall(require, 'mini.icons')
local diagnostic_configs = {
{ sev = vim.diagnostic.severity.ERROR, label = 'E', hl = 'DiagnosticError' },
{ sev = vim.diagnostic.severity.WARN, label = 'W', hl = 'DiagnosticWarn' },
{ sev = vim.diagnostic.severity.HINT, label = 'H', hl = 'DiagnosticHint' },
}
function _G.Status() function _G.Status()
local win = tonumber(vim.g.statusline_winid) local win = tonumber(vim.g.statusline_winid)
local buf = (win and vim.api.nvim_win_is_valid(win)) and vim.api.nvim_win_get_buf(win) local buf = (win and vim.api.nvim_win_is_valid(win)) and vim.api.nvim_win_get_buf(win)
or vim.api.nvim_get_current_buf() or vim.api.nvim_get_current_buf()
local bufname = vim.api.nvim_buf_get_name(buf) local bufname = vim.api.nvim_buf_get_name(buf)
local display_path = vim.fn.fnamemodify(bufname, ':.') local path = (bufname == '' and '[No Name]') or vim.fn.fnamemodify(bufname, ':.')
if display_path == '' then
display_path = '[No Name]'
end
local ext = vim.fn.fnamemodify(bufname, ':e') local nm = ' ' .. path
if ext == '' then if ok then
ext = display_path local icon, hl = mini_icons.get('file', path)
end if hl and hl ~= '' then
local icon, hl = icon_cache[ext] nm = ('%%#%s#%s%%* %s'):format(hl, icon or '', path)
if not icon then
icon, hl = MiniIcons.get('file', display_path)
icon_cache[ext] = { icon, hl }
else
icon, hl = icon[1], icon[2]
end
local nm = (icon ~= '' and hl ~= '') and ('%#' .. hl .. '#' .. icon .. '%* ' .. display_path)
or (' ' .. display_path)
local counts = vim.diagnostic.count(buf)
local parts = {}
for _, cfg in ipairs(diagnostic_configs) do
local n = counts[cfg.sev]
if n and n > 0 then
parts[#parts + 1] = ('%%#%s#%s%d%%*'):format(cfg.hl, cfg.label, n)
end end
end end
local dg = #parts > 0 and (table.concat(parts, ' ') .. ' ') or ''
local clients = vim.lsp.get_clients({ bufnr = buf }) local dg = vim.diagnostic.status(buf)
local lsp_clients = '' dg = dg ~= '' and (dg .. ' ') or ''
if #clients > 0 then
local names = vim.tbl_map(function(c)
return c.name
end, clients)
lsp_clients = '󰄭 ' .. table.concat(names, '/') .. ' '
end
local lsp_progress = vim.lsp.status() local prog = vim.lsp.status()
local progress_str = lsp_progress ~= '' and ('%#DiagnosticInfo#' .. lsp_progress .. '%* ') or '' prog = prog ~= '' and ('%#DiagnosticInfo#' .. prog .. '%* ') or ''
return nm .. '%m%r %=' .. dg .. lsp_clients .. progress_str return string.format('%s%%m%%r %%=%s%s%%l:%%L', nm, dg, prog)
end end
vim.opt.statusline = '%!v:lua.Status()' vim.opt.statusline = '%!v:lua.Status()'
local augroup = vim.api.nvim_create_augroup('CustomStatusline', { clear = true }) vim.api.nvim_create_autocmd({ 'DiagnosticChanged', 'BufEnter', 'LspProgress' }, {
vim.api.nvim_create_autocmd( group = vim.api.nvim_create_augroup('CustomStatusline', { clear = true }),
{ 'DiagnosticChanged', 'LspAttach', 'LspDetach', 'BufEnter', 'LspProgress' }, callback = function()
{ vim.cmd.redrawstatus()
group = augroup, end,
callback = function() })
vim.cmd.redrawstatus()
end,
}
)
+3 -15
View File
@@ -22,7 +22,7 @@
"src": "https://git.moomancer.xyz/DarthMooMancer/mason-conform.nvim.git" "src": "https://git.moomancer.xyz/DarthMooMancer/mason-conform.nvim.git"
}, },
"mason-lspconfig.nvim": { "mason-lspconfig.nvim": {
"rev": "a338f44149f5673882c32629697d67b0c0547aec", "rev": "cd6c64d85c9871aaf759d26f2371029d6d674a48",
"src": "https://github.com/mason-org/mason-lspconfig.nvim" "src": "https://github.com/mason-org/mason-lspconfig.nvim"
}, },
"mason.nvim": { "mason.nvim": {
@@ -35,32 +35,20 @@
"version": ">=0.0.0" "version": ">=0.0.0"
}, },
"nvim-lspconfig": { "nvim-lspconfig": {
"rev": "77b7432d4770d23b277d37923e5a08a442d8bb07", "rev": "d8d2fda7aae57030452ce8cd6e770b1eb704514e",
"src": "https://github.com/neovim/nvim-lspconfig" "src": "https://github.com/neovim/nvim-lspconfig"
}, },
"nvim-tmux-navigation": {
"rev": "4898c98702954439233fdaf764c39636681e2861",
"src": "https://github.com/alexghergh/nvim-tmux-navigation"
},
"nvim-treesitter": { "nvim-treesitter": {
"rev": "a2f694478be07f89c2d03cc17858a8745a400c4b", "rev": "a9c4e1457e2e59f1b82c8f78dcdb3b2517555200",
"src": "https://github.com/nvim-treesitter/nvim-treesitter" "src": "https://github.com/nvim-treesitter/nvim-treesitter"
}, },
"nvim-ts-autotag": { "nvim-ts-autotag": {
"rev": "d7220b55e16ed3c04e88086256def5d282429493", "rev": "d7220b55e16ed3c04e88086256def5d282429493",
"src": "https://github.com/windwp/nvim-ts-autotag" "src": "https://github.com/windwp/nvim-ts-autotag"
}, },
"nvim-web-devicons": {
"rev": "ec309a0eaff6ea967e58c275996155ab5c16938d",
"src": "https://github.com/nvim-tree/nvim-web-devicons"
},
"snacks.nvim": { "snacks.nvim": {
"rev": "882c996cf28183f4d63640de0b4c02ec886d01f2", "rev": "882c996cf28183f4d63640de0b4c02ec886d01f2",
"src": "https://github.com/folke/snacks.nvim" "src": "https://github.com/folke/snacks.nvim"
},
"tiny-inline-diagnostic.nvim": {
"rev": "46ae9b3c8f3039e96ff4497d190ad0aee091f30d",
"src": "https://github.com/rachartier/tiny-inline-diagnostic.nvim"
} }
} }
} }