migrate to lua neovim config
This commit is contained in:
39
.config/nvim/lua/treesitter.lua
Normal file
39
.config/nvim/lua/treesitter.lua
Normal file
@@ -0,0 +1,39 @@
|
||||
-- import nvim-treesitter plugin safely
|
||||
local status, treesitter = pcall(require, "nvim-treesitter.configs")
|
||||
if not status then
|
||||
return
|
||||
end
|
||||
|
||||
-- configure treesitter
|
||||
treesitter.setup({
|
||||
-- enable syntax highlighting
|
||||
highlight = {
|
||||
enable = true,
|
||||
},
|
||||
-- enable indentation
|
||||
indent = { enable = true },
|
||||
-- ensure these language parsers are installed
|
||||
ensure_installed = {
|
||||
"json",
|
||||
"javascript",
|
||||
"typescript",
|
||||
"tsx",
|
||||
"yaml",
|
||||
"html",
|
||||
"css",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"bash",
|
||||
"lua",
|
||||
"vim",
|
||||
"python",
|
||||
"rasi",
|
||||
"dockerfile",
|
||||
"printf",
|
||||
"regex",
|
||||
"sxhkdrc",
|
||||
"udev",
|
||||
},
|
||||
-- auto install above language parsers
|
||||
auto_install = true,
|
||||
})
|
||||
Reference in New Issue
Block a user