a
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
vim.pack.add ({
|
||||
'https://github.com/nvim-treesitter/nvim-treesitter'
|
||||
})
|
||||
|
||||
require('nvim-treesitter').setup {
|
||||
-- Directory to install parsers and queries to (prepended to `runtimepath` to have priority)
|
||||
install_dir = vim.fn.stdpath('data') .. '/site'
|
||||
}
|
||||
-- Required parsers and queries
|
||||
require('nvim-treesitter').install { 'lua', 'nix', 'javascript', 'html', 'css', 'c', 'cpp', 'python', 'kdl', 'markdown' }
|
||||
|
||||
-- Syntax highlighting
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
pattern = { 'lua', 'nix', 'javascript', 'html', 'css', 'c', 'cpp', 'python', 'kdl', 'markdown' },
|
||||
callback = function() vim.treesitter.start() end,
|
||||
})
|
||||
|
||||
-- Auto indentation
|
||||
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
|
||||
Reference in New Issue
Block a user