fix: remove remains of old treesitter setup, fix deprecated hover calls
This commit is contained in:
parent
e18c745662
commit
95813e5721
4 changed files with 10 additions and 80 deletions
|
|
@ -1,58 +0,0 @@
|
|||
require("nvim-treesitter").install({
|
||||
"bash",
|
||||
"c",
|
||||
"cmake",
|
||||
"comment",
|
||||
"cpp",
|
||||
"gitignore",
|
||||
"go",
|
||||
"html",
|
||||
"java",
|
||||
"javascript",
|
||||
"json",
|
||||
"jsx",
|
||||
"ledger",
|
||||
"lua",
|
||||
"luadoc",
|
||||
"luap",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"python",
|
||||
"query",
|
||||
"regex",
|
||||
"rust",
|
||||
"scala",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim",
|
||||
"vimdoc",
|
||||
"yaml",
|
||||
"zsh",
|
||||
})
|
||||
|
||||
local augroup = vim.api.nvim_create_augroup("treesitter-init", {})
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = {
|
||||
"cpp",
|
||||
"cmake",
|
||||
"go",
|
||||
"java",
|
||||
"javascript",
|
||||
"javascriptreact",
|
||||
"ledger",
|
||||
"lua",
|
||||
"markdown",
|
||||
"python",
|
||||
"rust",
|
||||
"typescript",
|
||||
"typescriptreact",
|
||||
"scala",
|
||||
},
|
||||
callback = function()
|
||||
vim.treesitter.start()
|
||||
vim.opt.foldmethod = "expr"
|
||||
vim.opt.foldlevel = 99
|
||||
vim.opt.foldexpr = "v:lua.vim.treesitter.foldexpr()"
|
||||
end,
|
||||
group = augroup,
|
||||
})
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
"Vim-Jinja2-Syntax": { "branch": "master", "commit": "2c17843b074b06a835f88587e1023ceff7e2c7d1" },
|
||||
"blink.cmp": { "branch": "main", "commit": "2ef3db111181c5eef22a462aa0122349a6027f28" },
|
||||
"blink.lib": { "branch": "main", "commit": "f29d8bac6549bc1e7d699c83f680823d7def98bd" },
|
||||
"claude-code.nvim": { "branch": "main", "commit": "55c0cb59828fbc3bec744288286a46f5d5750b83" },
|
||||
"codediff.nvim": { "branch": "main", "commit": "76ff1b13f0bcba655dca85cea1ef0df877a53c0f" },
|
||||
"conform.nvim": { "branch": "master", "commit": "18aeab3d63d350dcf44d64c462cc489a3412af40" },
|
||||
"deepl.vim": { "branch": "main", "commit": "d062824f418b52bc15a373f0b282b5a3d8effea1" },
|
||||
|
|
@ -9,7 +10,6 @@
|
|||
"gen.nvim": { "branch": "main", "commit": "c8e1f574d4a3a839dde73a87bdc319a62ee1e559" },
|
||||
"gina.vim": { "branch": "master", "commit": "ff6c2ddeca98f886b57fb42283c12e167d6ab575" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "dd3f588bacbeb041be6facf1742e42097f62165d" },
|
||||
"hover.nvim": { "branch": "main", "commit": "e73c00da3a9c87a21d2a8ddf7ab4a39824bd5d56" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" },
|
||||
|
|
@ -37,7 +37,6 @@
|
|||
"nvim-treesitter-context": { "branch": "master", "commit": "b311b30818951d01f7b4bf650521b868b3fece16" },
|
||||
"nvim-treesitter-textobjects": { "branch": "main", "commit": "851e865342e5a4cb1ae23d31caf6e991e1c99f1e" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "7d8dad2c837fcdf2e65997e68657c1a21c568074" },
|
||||
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
|
||||
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
|
||||
"shipwright.nvim": { "branch": "master", "commit": "e596ab48328c31873f4f4d2e070243bf9de16ff3" },
|
||||
|
|
@ -70,6 +69,7 @@
|
|||
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
|
||||
"vim-textobj-comment": { "branch": "master", "commit": "58ae4571b76a5bf74850698f23d235eef991dd4b" },
|
||||
"vim-textobj-user": { "branch": "master", "commit": "41a675ddbeefd6a93664a4dc52f302fe3086a933" },
|
||||
"vim-theme-chroma": { "branch": "lush", "commit": "0ad7be22f2244f99a877edfd6261eaba47952b6f" },
|
||||
"vimtex": { "branch": "master", "commit": "182ad387e3f3107699483606c9a2b6648f8437b2" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" },
|
||||
"workspace-diagnostics.nvim": { "branch": "main", "commit": "a35321d8401878cc9558e357acfd0da58b582739" }
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
-- disable, bug with nvim 0.12
|
||||
if false then
|
||||
return {
|
||||
"lewis6991/hover.nvim",
|
||||
config = function()
|
||||
require("hover").setup({
|
||||
require("hover").config({
|
||||
init = function()
|
||||
require("hover.providers.lsp")
|
||||
require("hover.providers.gh")
|
||||
|
|
@ -17,7 +19,8 @@ return {
|
|||
})
|
||||
|
||||
-- Setup keymaps
|
||||
vim.keymap.set("n", "K", require("hover").hover, { desc = "hover.nvim" })
|
||||
vim.keymap.set("n", "gK", require("hover").hover_select, { desc = "hover.nvim (select)" })
|
||||
vim.keymap.set("n", "K", require("hover").open, { desc = "hover.nvim" })
|
||||
vim.keymap.set("n", "gK", require("hover").select, { desc = "hover.nvim (select)" })
|
||||
end,
|
||||
}
|
||||
else return {} end
|
||||
|
|
|
|||
|
|
@ -1,26 +1,12 @@
|
|||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/playground",
|
||||
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
||||
cmd = {
|
||||
"TSPlaygroundToggle",
|
||||
"TSHighlightCapturesUnderCursor",
|
||||
"TSNodeUnderCursor",
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter-context",
|
||||
event = "VeryLazy",
|
||||
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
||||
cmd = { "TSContextEnable", "TSContextDisable", "TSContextToggle" },
|
||||
keys = {
|
||||
-- stylua: ignore start
|
||||
{ "[c", function() require("treesitter-context").go_to_context() end, desc = "Go to context start", },
|
||||
{ "<leader>c", function() require("treesitter-context").toggle() end, desc = "Toggle context view", },
|
||||
{ "[c", function() require("treesitter-context").go_to_context() end, desc = "Go to context start", },
|
||||
{ "<leader>c", function() require("treesitter-context").toggle() end, desc = "Toggle context view", },
|
||||
-- stylua: ignore end
|
||||
},
|
||||
opts = { enable = true },
|
||||
|
|
@ -33,7 +19,6 @@ return {
|
|||
{
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
branch = "main",
|
||||
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
||||
init = function()
|
||||
-- Disable entire built-in ftplugin mappings to avoid conflicts.
|
||||
-- See https://github.com/neovim/neovim/tree/master/runtime/ftplugin for built-in ftplugins.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue