Compare commits
2 Commits
87f480a24d
...
baf5c69e15
Author | SHA1 | Date | |
---|---|---|---|
baf5c69e15 | |||
d7937a765c |
|
@ -29,8 +29,8 @@
|
||||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" },
|
"nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "3ea99227e316c5028f57a4d86a1a7fd01dd876d0" },
|
"nvim-lspconfig": { "branch": "master", "commit": "3ea99227e316c5028f57a4d86a1a7fd01dd876d0" },
|
||||||
"nvim-surround": { "branch": "main", "commit": "0e62500b98f4513feaaf7425c135472457ea5b7d" },
|
"nvim-surround": { "branch": "main", "commit": "0e62500b98f4513feaaf7425c135472457ea5b7d" },
|
||||||
"nvim-treesitter": { "branch": "main", "commit": "c1dfc39285e4a11983dfbe556fb0be7f2a749977" },
|
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||||
"nvim-treesitter-textobjects": { "branch": "main", "commit": "fa32a45fdbab9c9c3bda9ecec9b12dddb221b927" },
|
"nvim-treesitter-textobjects": { "branch": "master", "commit": "0f051e9813a36481f48ca1f833897210dbcfffde" },
|
||||||
"nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" },
|
"nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" },
|
||||||
"peek.nvim": { "branch": "master", "commit": "5820d937d5414baea5f586dc2a3d912a74636e5b" },
|
"peek.nvim": { "branch": "master", "commit": "5820d937d5414baea5f586dc2a3d912a74636e5b" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||||
|
|
|
@ -139,23 +139,3 @@ vim.api.nvim_create_autocmd("CursorMoved", {
|
||||||
vim.diagnostic.config({ virtual_lines = false })
|
vim.diagnostic.config({ virtual_lines = false })
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Auto install treesitter parser and start them
|
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
|
||||||
desc = "Enable Treesitter",
|
|
||||||
group = vim.api.nvim_create_augroup("enable_treesitter", {}),
|
|
||||||
callback = function(event)
|
|
||||||
local has_treesitter, treesitter = pcall(require, "nvim-treesitter")
|
|
||||||
if has_treesitter then
|
|
||||||
local language = vim.treesitter.language.get_lang(event.match)
|
|
||||||
treesitter.install(language):await(function()
|
|
||||||
if pcall(vim.treesitter.start) then
|
|
||||||
-- Use Treesitter indentation and folds.
|
|
||||||
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
|
|
||||||
vim.wo.foldmethod = "expr"
|
|
||||||
vim.wo.foldexpr = "v:lua.vim.treesitter.foldexpr()"
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
|
@ -3,12 +3,13 @@ return {
|
||||||
-- Highlight, edit, and navigate code
|
-- Highlight, edit, and navigate code
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{ "nvim-treesitter/nvim-treesitter-textobjects", branch = "main" },
|
{ "nvim-treesitter/nvim-treesitter-textobjects", branch = "master" },
|
||||||
"windwp/nvim-ts-autotag",
|
{ "windwp/nvim-ts-autotag", opts = {} },
|
||||||
},
|
},
|
||||||
lazy = false,
|
lazy = false,
|
||||||
branch = "main",
|
branch = "master",
|
||||||
build = ":TSUpdate",
|
build = ":TSUpdate",
|
||||||
|
main = "nvim-treesitter.configs",
|
||||||
opts = {
|
opts = {
|
||||||
ensure_installed = require("tools.highlight"),
|
ensure_installed = require("tools.highlight"),
|
||||||
|
|
||||||
|
@ -70,9 +71,6 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
autotag = {
|
|
||||||
enable = true,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user