Update neovim config to use lazyvim

This commit is contained in:
Gabriel Brown
2026-05-16 14:26:09 -04:00
parent 19b8ec2542
commit 372a0f60e5
36 changed files with 592 additions and 1522 deletions
+28 -89
View File
@@ -1,92 +1,31 @@
return {
'nvim-treesitter/nvim-treesitter',
branch = 'master',
lazy = false,
build = ':TSUpdate',
dependencies = {
{ 'nvim-treesitter/playground', },
{
'nvim-treesitter/nvim-treesitter-context',
config = function()
require'treesitter-context'.setup({
enable = true,
multiwindow = false,
max_lines = 10,
min_window_height = 0,
line_numbers = true,
multiline_threshold = 20,
trim_scope = 'outer',
mode = 'topline',
separator = nil,
zindex = 20,
on_attach = nil,
})
end,
},
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
vim.list_extend(opts.ensure_installed, {
"cmake",
"cpp",
"dockerfile",
"git_config",
"git_rebase",
"gitattributes",
"gitcommit",
"gitignore",
"java",
"jsdoc",
"jsonc",
"kotlin",
"latex",
"make",
"php",
"scala",
"sql",
"svelte",
"swift",
"toml",
"xml",
"zig",
})
end,
},
config = function()
require'nvim-treesitter.install'.update({ with_sync = true })
require'nvim-treesitter.configs'.setup({
ensure_installed = {
'bash',
'c',
'cmake',
'cpp',
'css',
'diff',
'dockerfile',
'git_config',
'git_rebase',
'gitattributes',
'gitcommit',
'gitignore',
'html',
'java',
'javascript',
'jsdoc',
'json',
'jsonc',
'kotlin',
'latex',
'lua',
'luadoc',
'luap',
'make',
'markdown',
'markdown_inline',
'php',
'printf',
'python',
'query',
'regex',
'rust',
'scala',
'sql',
'svelte',
'swift',
'toml',
'tsx',
'typescript',
'vim',
'vimdoc',
'xml',
'yaml',
'zig'
},
sync_install = false,
auto_install = true,
indent = { enable = true },
highlight = {
enable = true,
disable = function(lang, buf)
local max_filesize = 500 * 1024 -- 100 KB
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
if ok and stats and stats.size > max_filesize then
return true
end
end,
additional_vim_regex_highlighting = false,
},
})
end,
}