feat(nvim): treesitter enable and Snacks

This commit is contained in:
2026-03-25 20:25:20 +00:00
parent dd22869a29
commit dd44604513
+36 -21
View File
@@ -120,14 +120,50 @@ vim.pack.add({
'https://github.com/nvim-tree/nvim-web-devicons',
})
local treesitter = require('nvim-treesitter')
vim.api.nvim_create_autocmd('FileType', {
callback = function(args)
if
vim.list_contains(
treesitter.get_installed(),
vim.treesitter.language.get_lang(args.match)
)
then
vim.treesitter.start(args.buf)
end
end,
})
-- colorscheme --
require('onedark').setup({ style = 'dark' })
require('onedark').load()
-- mini --
require('mini.icons').setup()
require('mini.surround').setup()
-- snacks --
require('snacks').setup({
bigfile = { enabled = true },
notifier = { enabled = true },
notify = { enabled = true },
quickfile = { enabled = true },
statuscolumn = { enabled = true },
input = { enabled = true },
image = {
doc = {
inline = false,
float = true,
max_width = 10,
max_height = 5,
}
},
words = {
debounce = 10
}
})
require('mini.pairs').setup({
mappings = {
-- Prevents the action if the cursor is just before any character or next to a "\".
@@ -153,27 +189,6 @@ require('mini.ai').setup({
n_lines = 1000
})
-- snacks --
require('snacks').setup({
bigfile = { enabled = true },
notifier = { enabled = true },
notify = { enabled = true },
quickfile = { enabled = true },
statuscolumn = { enabled = true },
input = { enabled = true },
image = {
doc = {
inline = false,
float = true,
max_width = 10,
max_height = 5,
}
},
words = {
debounce = 10
}
})
-- tiny-glimmer --
require('tiny-glimmer').setup({
overwrite = {