Update treesitter to main
This commit is contained in:
parent
98d9158287
commit
0d3d49ddf4
|
@ -4,6 +4,8 @@
|
|||
|
||||
[includeIf "gitdir:~/Projects/ALTEN/"]
|
||||
path = ~/.dotfiles/git/profiles/ALTEN
|
||||
[includeIf "gitdir:~/Projects/vlasman/"]
|
||||
path = ~/.dotfiles/git/profiles/ALTEN
|
||||
[filter "lfs"]
|
||||
process = git-lfs filter-process
|
||||
required = true
|
||||
|
|
|
@ -35,9 +35,9 @@
|
|||
"nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "3ea99227e316c5028f57a4d86a1a7fd01dd876d0" },
|
||||
"nvim-surround": { "branch": "main", "commit": "0e62500b98f4513feaaf7425c135472457ea5b7d" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "938003c79d23912d2cafd56d939346860f78127a" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "0f051e9813a36481f48ca1f833897210dbcfffde" },
|
||||
"nvim-treesitter": { "branch": "main", "commit": "c1dfc39285e4a11983dfbe556fb0be7f2a749977" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "404502e607c3b309e405be9112c438c721153372" },
|
||||
"nvim-treesitter-textobjects": { "branch": "main", "commit": "fa32a45fdbab9c9c3bda9ecec9b12dddb221b927" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" },
|
||||
"peek.nvim": { "branch": "master", "commit": "5820d937d5414baea5f586dc2a3d912a74636e5b" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||
|
|
|
@ -32,3 +32,15 @@ vim.api.nvim_create_autocmd({ "InsertEnter", "WinLeave" }, {
|
|||
group = cursor_group,
|
||||
pattern = "*",
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = require("tools.highlight"),
|
||||
callback = function()
|
||||
-- syntax highlighting, provided by Neovim
|
||||
vim.treesitter.start()
|
||||
-- folds, provided by Neovim
|
||||
vim.wo.foldexpr = "v:lua.vim.treesitter.foldexpr()"
|
||||
-- indentation, provided by nvim-treesitter
|
||||
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
|
||||
end,
|
||||
})
|
||||
|
|
|
@ -4,27 +4,15 @@ return {
|
|||
"nvim-treesitter/nvim-treesitter",
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter-context",
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
{ "nvim-treesitter/nvim-treesitter-textobjects", branch = "main" },
|
||||
"windwp/nvim-ts-autotag",
|
||||
},
|
||||
lazy = false,
|
||||
branch = "main",
|
||||
build = ":TSUpdate",
|
||||
opts = {
|
||||
-- Add languages to be installed here that you want installed for treesitter
|
||||
ensure_installed = {
|
||||
"c",
|
||||
"cpp",
|
||||
"go",
|
||||
"lua",
|
||||
"python",
|
||||
"rust",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vimdoc",
|
||||
"vim",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"bash",
|
||||
"sql",
|
||||
},
|
||||
ensure_installed = require("tools.highlight"),
|
||||
|
||||
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
|
||||
auto_install = true,
|
||||
|
@ -91,10 +79,6 @@ return {
|
|||
enable = true,
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("nvim-treesitter.configs").setup(opts)
|
||||
require("nvim-treesitter.install").update({ with_sync = true })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter-context",
|
||||
|
|
16
nvim/dot-config/nvim/lua/tools/highlight.lua
Normal file
16
nvim/dot-config/nvim/lua/tools/highlight.lua
Normal file
|
@ -0,0 +1,16 @@
|
|||
return {
|
||||
"c",
|
||||
"cpp",
|
||||
"go",
|
||||
"lua",
|
||||
"python",
|
||||
"rust",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vimdoc",
|
||||
"vim",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"bash",
|
||||
"sql",
|
||||
}
|
Loading…
Reference in New Issue
Block a user