From d00bf2cb2d5087164fa509a4f20a2be62a519044 Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Tue, 21 Apr 2026 01:23:18 +0100 Subject: refactor: restructure to chezmoi source state Rename home/ contents to chezmoi naming conventions: - dot_ prefix for dotfiles and dot-dirs - private_dot_ for .gnupg and .ssh directories - private_ for 0600 files (nym.pub) - executable_ for scripts in .local/bin and display-toggle.sh - symlink_ for mimeapps.list symlink --- dot_config/nvim/lua/plugins/treesitter.lua | 83 ++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 dot_config/nvim/lua/plugins/treesitter.lua (limited to 'dot_config/nvim/lua/plugins/treesitter.lua') diff --git a/dot_config/nvim/lua/plugins/treesitter.lua b/dot_config/nvim/lua/plugins/treesitter.lua new file mode 100644 index 0000000..a4a488c --- /dev/null +++ b/dot_config/nvim/lua/plugins/treesitter.lua @@ -0,0 +1,83 @@ +require("treewalker").setup({}) + +vim.keymap.set({ "n", "v" }, "", "Treewalker Up", { silent = true, desc = "Moves up to the previous neighbor node" }) +vim.keymap.set({ "n", "v" }, "", "Treewalker Down", { silent = true, desc = "Moves up to the next neighbor node" }) +vim.keymap.set({ "n", "v" }, "", "Treewalker Left", { silent = true, desc = "Moves to the first ancestor node that's on a different line from the current node" }) +vim.keymap.set({ "n", "v" }, "", "Treewalker Right", { silent = true, desc = "Moves to the next node down that's indented further than the current node" }) +vim.keymap.set("n", "", "Treewalker SwapUp", { silent = true, desc = "Swaps the highest node on the line upwards in the document" }) +vim.keymap.set("n", "", "Treewalker SwapDown", { silent = true, desc = "Swaps the biggest node on the line downward in the document" }) +vim.keymap.set("n", "", "Treewalker SwapLeft", { silent = true, desc = "Swap the node under the cursor with its previous neighbor" }) +vim.keymap.set("n", "", "Treewalker SwapRight", { silent = true, desc = "Swap the node under the cursor with its next neighbor" }) + +require("nvim-treesitter").install({ + "awk", + "bash", + "c", + "cmake", + "comment", + "cpp", + "css", + "csv", + "diff", + "dockerfile", + "doxygen", + "editorconfig", + "fortran", + "git_config", + "git_rebase", + "gitattributes", + "gitcommit", + "gitignore", + "groovy", + "gpg", + "hlsplaylist", + "html", + "http", + "ini", + "javascript", + "jq", + "jsdoc", + "json", + "just", + "llvm", + "lua", + "luadoc", + "luap", + "make", + "markdown", + "markdown_inline", + "query", + "passwd", + "printf", + "python", + "regex", + "readline", + "requirements", + "rust", + "sql", + "ssh_config", + "strace", + "tablegen", + "todotxt", + "toml", + "typescript", + "vim", + "vimdoc", + "xcompose", + "xml", + "xresources", + "yaml", +}) + +require("nvim-dap-repl-highlights").setup({}) +require("treesitter-context").setup({}) + +require("ts_context_commentstring").setup({ + enable_autocmd = false, +}) +local get_option = vim.filetype.get_option +vim.filetype.get_option = function(filetype, option) + return option == "commentstring" + and require("ts_context_commentstring.internal").calculate_commentstring() + or get_option(filetype, option) +end -- cgit v1.2.3-70-g09d2