Added treesitter

This commit is contained in:
wilmc
2026-06-24 18:54:31 +02:00
parent f45504df54
commit a73f64de81
4 changed files with 31 additions and 4 deletions
+3 -1
View File
@@ -1,3 +1,5 @@
require("options")
require("plugins")
require("colorschemes")
require("plugins.mini")
require("plugins.treesitter")
require("plugins.lsp")
+7
View File
@@ -0,0 +1,7 @@
vim.lsp.config['clangd'] = {
cmd = { 'clangd' },
filetypes = { 'c', 'cpp' },
root_markers = { 'compile_commands.json', 'CMakeLists.txt', '.git' },
}
vim.lsp.enable('clangd')
@@ -13,6 +13,6 @@ local map = vim.keymap.set
map('n', '<M-O>', '<cmd>Pick files<CR>') -- find file
map('n', '<M-S>', '<cmd>Pick grep_live<CR>') -- live grep
map('n', '<M-B>', '<cmd>Pick buffers<CR>') -- buffer list
map('n', '<leader>fe', MiniFiles.open) -- file explorer
map('n', '<leader>fe', function()
MiniFiles.open()
end) -- file explorer
+18
View File
@@ -0,0 +1,18 @@
-- Treesitter
vim.pack.add({ 'https://github.com/nvim-treesitter/nvim-treesitter' })
local ts = require('nvim-treesitter')
ts.setup({})
ts.install {
'lua',
'cpp',
'c'
}
vim.api.nvim_create_autocmd('FileType', {
pattern = { 'cpp', 'c', 'lua' },
callback = function()
vim.treesitter.start()
end
})