diff --git a/Baud/.config/nvim/lazy-lock.json b/Baud/.config/nvim/lazy-lock.json new file mode 100755 index 0000000..c02ccbc --- /dev/null +++ b/Baud/.config/nvim/lazy-lock.json @@ -0,0 +1,19 @@ +{ + "blink.cmp": { "branch": "main", "commit": "ae5a4ce8f7e519e49de7ae6fcadd74547f820a52" }, + "conform.nvim": { "branch": "master", "commit": "f4e8837878fc5712d053ba3091a73d27d96a09e2" }, + "dropbar.nvim": { "branch": "master", "commit": "b63fe2ef7cc84a2193f867a0cfb6988a1233ab31" }, + "fzf-lua": { "branch": "main", "commit": "cd9ab4ed3f44d062e511aa9de41ccf815f0ec962" }, + "indent-blankline.nvim": { "branch": "master", "commit": "259357fa4097e232730341fa60988087d189193a" }, + "lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" }, + "markdown.nvim": { "branch": "main", "commit": "0022a579ac7355966be5ade77699b88c76b6a549" }, + "mini.diff": { "branch": "main", "commit": "5947342c95a9c2e24c659b54bb8ef083da4495ad" }, + "mini.hipatterns": { "branch": "main", "commit": "f34975103a38b3f608219a1324cdfc58ea660b8b" }, + "mini.icons": { "branch": "main", "commit": "44c0160526f7ae17ca8e8eab9ab235d047fcf7a6" }, + "mini.move": { "branch": "main", "commit": "4caa1c212f5ca3d1633d21cfb184808090ed74b1" }, + "mini.notify": { "branch": "main", "commit": "a933dc637b84314976d6482449f9f51ecd02d2b3" }, + "mini.statusline": { "branch": "main", "commit": "813854243156472c9d0bc9c64ea0af159b9b37ca" }, + "nvim-lspconfig": { "branch": "master", "commit": "9f2c279cf9abe584f03bfeb37c6658d68e3ff49d" }, + "nvim-treesitter": { "branch": "master", "commit": "102bc74e093ef54aab57a368db15befeb9ba9d58" }, + "nvim-treesitter-context": { "branch": "master", "commit": "8fd989b6b457a448606b4a2e51f9161700f609a7" }, + "srcery-vim": { "branch": "master", "commit": "fa2242a3dd81804468241c0a8ebb32266c33fa60" } +} diff --git a/Baud/.config/nvim/lua/main/keymaps.lua b/Baud/.config/nvim/lua/main/keymaps.lua index e5de851..31f7732 100755 --- a/Baud/.config/nvim/lua/main/keymaps.lua +++ b/Baud/.config/nvim/lua/main/keymaps.lua @@ -1,5 +1,7 @@ local map = vim.keymap.set +vim.g.mapleader = " " + -- Enter into brackets map("i", "<>", "<>", { desc = "Enter into angled brackets" }) map("i", "()", "()", { desc = "Enter into round brackets" }) @@ -18,11 +20,11 @@ map("i", "", "gk", { desc = "Move up a screenline" }) map("i", "", "gj", { desc = "Move down a screenline" }) -- Add empty lines -map('n', 'O', "O", { desc = "Append a new line below the current line" }) -map('n', 'o', "o", { desc = "Append a new line above the current line" }) +map('n', 'O', "O", { desc = "Append empty line below" }) +map('n', 'o', "o", { desc = "Append empty line above" }) -- Language server protocol -map("n", "cr", vim.lsp.buf.rename, { desc = "Rename" }) -map("n", "h", vim.lsp.buf.hover, { desc = "Hover" }) -map("n", "]]", vim.diagnostic.goto_next, { desc = "Next diagnostic" }) -map("n", "[[", vim.diagnostic.goto_prev, { desc = "Previous diagnostic" }) +map("n", "rn", vim.lsp.buf.rename, { desc = "Rename" }) +map("n", "K", vim.lsp.buf.hover, { desc = "Hover" }) +map("n", "]d", vim.diagnostic.goto_next, { desc = "Next diagnostic" }) +map("n", "[d", vim.diagnostic.goto_prev, { desc = "Previous diagnostic" }) diff --git a/Baud/.config/nvim/lua/main/plugins.lua b/Baud/.config/nvim/lua/main/plugins.lua index dc5aaa9..d41fde0 100755 --- a/Baud/.config/nvim/lua/main/plugins.lua +++ b/Baud/.config/nvim/lua/main/plugins.lua @@ -27,8 +27,17 @@ require("lazy").setup({ ui = { border = "rounded", }, - change_detection = { - enabled = true, - notify = true, + performance = { + rtp = { + disabled_plugins = { + "gzip", + "matchit", + "matchparen", + "netrwPlugin", + "tarPlugin", + "tohtml", + "tutor", + }, + }, }, }) diff --git a/Baud/.config/nvim/lua/main/settings.lua b/Baud/.config/nvim/lua/main/settings.lua index 41b935f..6d93c18 100755 --- a/Baud/.config/nvim/lua/main/settings.lua +++ b/Baud/.config/nvim/lua/main/settings.lua @@ -1,11 +1,5 @@ -local g = vim.g local o = vim.o local a = vim.api -local wo = vim.wo -local bo = vim.bo - --- File type detection -o.filetype = on -- Highlight current location o.cursorline = true @@ -20,17 +14,11 @@ a.nvim_command('aunmenu PopUp.-1-') o.number = true a.nvim_create_autocmd( { "BufEnter", "FocusGained", "InsertLeave", "WinEnter" }, - { - pattern = "*", - command = "if &nu && mode() != 'i' | set rnu | endif", - } + { pattern = "*", command = "if &nu && mode() != 'i' | set rnu | endif", } ) a.nvim_create_autocmd( { "BufLeave", "FocusLost", "InsertEnter", "WinLeave" }, - { - pattern = "*", - command = "if &nu | set nornu | endif", - } + { pattern = "*", command = "if &nu | set nornu | endif", } ) -- No line wrap and better scrolling @@ -52,8 +40,9 @@ o.hlsearch = false -- Shows the effects of a substitution in another panel o.inccommand = "split" --- Allow code folding (mostly configured with treesitter) -o.foldlevel = 3 +-- Allow code folding +o.foldmethod = "indent" +o.foldlevel = 4 -- Better indents o.autoindent = true @@ -88,12 +77,8 @@ a.nvim_create_autocmd("TextYankPost", { pattern = "*", }) --- Improve netrw -g.netrw_liststyle = 3 -g.netrw_winsize = -30 - -- Disable unused features -local disabled_built_ins = { +for _, plugin in pairs({ "netrwFileHandlers", "getscript", "getscriptPlugin", @@ -104,8 +89,6 @@ local disabled_built_ins = { "rrhelper", "spellfile_plugin", "matchit" -} - -for _, plugin in pairs(disabled_built_ins) do +}) do vim.g["loaded_" .. plugin] = 1 end diff --git a/Baud/.config/nvim/lua/plugins/conform.lua b/Baud/.config/nvim/lua/plugins/conform.lua index e1784fa..ae4d329 100755 --- a/Baud/.config/nvim/lua/plugins/conform.lua +++ b/Baud/.config/nvim/lua/plugins/conform.lua @@ -3,8 +3,7 @@ return { "stevearc/conform.nvim", - event = { "BufWritePre" }, - cmd = { "ConformInfo" }, + cmd = "ConformInfo", keys = { { "f", @@ -21,6 +20,7 @@ return { scss = { "prettierd" }, less = { "prettierd" }, html = { "prettierd" }, + xhtml = { "prettierd" }, markdown = { "prettierd" }, php = { "prettierd" }, python = { "ruff" }, diff --git a/Baud/.config/nvim/lua/plugins/dropbar.lua b/Baud/.config/nvim/lua/plugins/dropbar.lua index 32e40bb..3e09b40 100755 --- a/Baud/.config/nvim/lua/plugins/dropbar.lua +++ b/Baud/.config/nvim/lua/plugins/dropbar.lua @@ -3,4 +3,11 @@ return { "Bekaboo/dropbar.nvim", + config = function() + local map = vim.keymap.set + local dropbar_api = require('dropbar.api') + map('n', ';', dropbar_api.pick, { desc = 'Pick symbols in winbar' }) + map('n', '[;', dropbar_api.goto_context_start, { desc = 'Go to start of current context' }) + map('n', '];', dropbar_api.select_next_context, { desc = 'Select next context' }) + end } diff --git a/Baud/.config/nvim/lua/plugins/fzf-lua.lua b/Baud/.config/nvim/lua/plugins/fzf-lua.lua index 81eb749..1bf1475 100755 --- a/Baud/.config/nvim/lua/plugins/fzf-lua.lua +++ b/Baud/.config/nvim/lua/plugins/fzf-lua.lua @@ -3,28 +3,31 @@ return { "ibhagwan/fzf-lua", - config = function() - local map = vim.keymap.set - local fzf = require('fzf-lua') + cmd = "FzfLua", + keys = { + { "gr", "FzfLua live_grep_native", desc = "Grep" }, + { "grc", "FzfLua grep_cword", desc = "Grep word under cursor" }, + { "grC", "FzfLua grep_cword", desc = "Grep WORD under cursor" }, + { "ff", "FzfLua files", desc = "Find files" }, + { "b", "FzfLua buffers", desc = "Find buffers" }, - map("n", "gr", fzf.grep, { desc = "Grep" }) - map("n", "grc", fzf.grep_cword, { desc = "Grep word under cursor" }) - map("n", "ff", fzf.files, { desc = "Find files" }) - map("n", "b", fzf.buffers, { desc = "Find buffers" }) + { "ss", "FzfLua spell_suggest", desc = "Spell suggest" }, + { "ft", "FzfLua filetypes", desc = "Change filetypes" }, + { "km", "FzfLua keymaps", desc = "View keymaps" }, - map("n", "ss", fzf.spell_suggest, { desc = "Spell suggest" }) - map("n", "ft", fzf.filetypes, { desc = "Change filetypes" }) - map("n", "km", fzf.keymaps, { desc = "View keymaps" }) + { "ch", "FzfLua command_history", desc = "Command history" }, + { "sh", "FzfLua search_history", desc = "Search history" }, + { "ht", "FzfLua help_tags", desc = "Help tags" }, + { "hg", "FzfLua highlights", desc = "Highlights" }, - map("n", "ch", fzf.command_history, { desc = "Command history" }) - map("n", "sh", fzf.search_history, { desc = "Search history" }) + { "sc", "FzfLua git_bcommits", desc = "Source control commits" }, - map("n", "lr", fzf.lsp_references, { desc = "LSP references" }) - map("n", "ld", fzf.lsp_definitions, { desc = "LSP definitions" }) - map("n", "ltd", fzf.lsp_typedefs, { desc = "LSP type definitions" }) - map("n", "li", fzf.lsp_implementations, { desc = "LSP implementations" }) - map("n", "lds", fzf.lsp_document_symbols, { desc = "LSP document symbols" }) - map("n", "lws", fzf.lsp_workspace_symbols, { desc = "LSP workspace symbols" }) - map("n", "ca", fzf.lsp_code_actions, { desc = "LSP code actions" }) - end, + { "ld", "FzfLua lsp_definitions", desc = "LSP definitions" }, + { "lr", "FzfLua lsp_references", desc = "LSP references" }, + { "li", "FzfLua lsp_implementations", desc = "LSP implementations" }, + { "ltd", "FzfLua lsp_typedefs", desc = "LSP type definitions" }, + { "lds", "FzfLua lsp_document_symbols", desc = "LSP document symbols" }, + { "lws", "FzfLua lsp_workspace_symbols", desc = "LSP workspace symbols" }, + { "ca", "FzfLua lsp_code_actions", desc = "LSP code actions" }, + } } diff --git a/Baud/.config/nvim/lua/plugins/indent-blankline.lua b/Baud/.config/nvim/lua/plugins/indent-blankline.lua index f45b052..9cd70e8 100755 --- a/Baud/.config/nvim/lua/plugins/indent-blankline.lua +++ b/Baud/.config/nvim/lua/plugins/indent-blankline.lua @@ -3,6 +3,7 @@ return { "lukas-reineke/indent-blankline.nvim", + event = "VeryLazy", main = "ibl", opts = { scope = { diff --git a/Baud/.config/nvim/lua/plugins/lsp/blink-cmp.lua b/Baud/.config/nvim/lua/plugins/lsp/blink-cmp.lua new file mode 100755 index 0000000..65e925b --- /dev/null +++ b/Baud/.config/nvim/lua/plugins/lsp/blink-cmp.lua @@ -0,0 +1,13 @@ +-- Completion engine +-- https://github.com/Saghen/blink.cmp + +return { + "saghen/blink.cmp", + lazy = false, + version = 'v0.*', + opts = { + sources = { + default = { "lsp", "path", "snippets", "buffer" }, + }, + }, +} diff --git a/Baud/.config/nvim/lua/plugins/lsp/nvim-cmp.lua b/Baud/.config/nvim/lua/plugins/lsp/nvim-cmp.lua deleted file mode 100755 index cd996ce..0000000 --- a/Baud/.config/nvim/lua/plugins/lsp/nvim-cmp.lua +++ /dev/null @@ -1,35 +0,0 @@ --- Completion engine --- https://github.com/hrsh7th/nvim-cmp - -return { - "hrsh7th/nvim-cmp", - dependencies = { - "hrsh7th/cmp-nvim-lsp", - "chrisgrieser/cmp-nerdfont", - "hrsh7th/cmp-buffer", - "hrsh7th/cmp-path", - }, - opts = function() - local cmp = require("cmp") - - cmp.setup({ - mapping = cmp.mapping.preset.insert({ - [""] = cmp.mapping.select_next_item(), - [""] = cmp.mapping.select_prev_item(), - [""] = cmp.mapping.complete(), - [""] = cmp.mapping.abort(), - [""] = cmp.mapping.confirm({ select = true }), - }), - sources = cmp.config.sources({ - { name = "nvim_lsp" }, - { name = "path" }, - { name = "nerdfont" }, - }, { - { name = "buffer" }, - }), - formatting = { - format = require("nvim-highlight-colors").format - } - }) - end -} diff --git a/Baud/.config/nvim/lua/plugins/lsp/nvim-lspconfig.lua b/Baud/.config/nvim/lua/plugins/lsp/nvim-lspconfig.lua index 369e58e..19eb2af 100755 --- a/Baud/.config/nvim/lua/plugins/lsp/nvim-lspconfig.lua +++ b/Baud/.config/nvim/lua/plugins/lsp/nvim-lspconfig.lua @@ -2,19 +2,16 @@ -- https://github.com/neovim/nvim-lspconfig return { - "neovim/nvim-lspconfig", - init = function() - local capabilities = vim.lsp.protocol.make_client_capabilities() - capabilities.textDocument.completion.completionItem.snippetSupport = true - - local servers = { + 'neovim/nvim-lspconfig', + opts = { + servers = { bashls = {}, emmet_language_server = {}, cssls = { capabilities = capabilities }, html = { capabilities = capabilities }, + lemminx = {}, yamlls = {}, - tailwindcss = {}, - tsserver = {}, + ts_ls = {}, rust_analyzer = { settings = { ['rust-analyzer'] = { @@ -26,31 +23,25 @@ return { }, lua_ls = { on_init = function(client) - local path = client.workspace_folders[1].name - if vim.loop.fs_stat(path .. '/.luarc.json') or vim.loop.fs_stat(path .. '/.luarc.jsonc') then - return - end - client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, { - workspace = { - checkThirdParty = false, - library = { - vim.env.VIMRUNTIME - } - } + workspace = { library = { vim.env.VIMRUNTIME } } }) end, - settings = { - Lua = {} - } + settings = { Lua = {} } }, phpactor = {}, ruff = {}, taplo = {}, } - - for server, config in pairs(servers) do - require("lspconfig")[server].setup(config) + }, + inlay_hints = { + enabled = true, + }, + config = function(_, opts) + local lspconfig = require('lspconfig') + for server, config in pairs(opts.servers) do + config.capabilities = require('blink.cmp').get_lsp_capabilities(config.capabilities) + lspconfig[server].setup(config) end - end, + end } diff --git a/Baud/.config/nvim/lua/plugins/lsp/nvim-snippets.lua b/Baud/.config/nvim/lua/plugins/lsp/nvim-snippets.lua deleted file mode 100755 index c49516d..0000000 --- a/Baud/.config/nvim/lua/plugins/lsp/nvim-snippets.lua +++ /dev/null @@ -1,26 +0,0 @@ --- Snippet engine --- https://github.com/garymjr/nvim-snippets - -return { - "garymjr/nvim-snippets", - keys = { - { - "", - function() - return vim.snippet.active({ direction = 1 }) and "lua vim.snippet.jump(1)" or "" - end, - expr = true, - silent = true, - mode = { "i", "s" }, - }, - { - "", - function() - return vim.snippet.active({ direction = -1 }) and "lua vim.snippet.jump(-1)" or "" - end, - expr = true, - silent = true, - mode = { "i", "s" }, - }, - }, -} diff --git a/Baud/.config/nvim/lua/plugins/markdown.lua b/Baud/.config/nvim/lua/plugins/markdown.lua index e492657..8081e2d 100644 --- a/Baud/.config/nvim/lua/plugins/markdown.lua +++ b/Baud/.config/nvim/lua/plugins/markdown.lua @@ -4,5 +4,4 @@ return { "MeanderingProgrammer/markdown.nvim", ft = "markdown", - opts = {} } diff --git a/Baud/.config/nvim/lua/plugins/mini-diff.lua b/Baud/.config/nvim/lua/plugins/mini-diff.lua index 7c72699..ac0740a 100755 --- a/Baud/.config/nvim/lua/plugins/mini-diff.lua +++ b/Baud/.config/nvim/lua/plugins/mini-diff.lua @@ -3,6 +3,7 @@ return { "echasnovski/mini.diff", + event = "VeryLazy", opts = { view = { style = "sign", diff --git a/Baud/.config/nvim/lua/plugins/mini-hipatterns.lua b/Baud/.config/nvim/lua/plugins/mini-hipatterns.lua new file mode 100755 index 0000000..6ae93c4 --- /dev/null +++ b/Baud/.config/nvim/lua/plugins/mini-hipatterns.lua @@ -0,0 +1,31 @@ +-- Highlight patterns in text +-- https://github.com/echasnovski/mini.hipatterns + +return { + "echasnovski/mini.hipatterns", + event = "VeryLazy", + opts = function() + local hi = require("mini.hipatterns") + return { + highlighters = { + hex_color = hi.gen_highlighter.hex_color(), + + fixme = { pattern = '%f[%w]()FIXME()%f[%W]', group = 'DiagnosticError' }, + hack = { pattern = '%f[%w]()HACK()%f[%W]', group = 'DiagnosticWarn' }, + todo = { pattern = '%f[%w]()TODO()%f[%W]', group = 'DiagnosticInfo' }, + note = { pattern = '%f[%w]()NOTE()%f[%W]', group = 'DiagnosticHint' }, + bug = { pattern = '%f[%w]()BUG()%f[%W]', group = 'DiagnosticError' }, + warn = { pattern = '%f[%w]()WARN()%f[%W]', group = 'DiagnosticWarn' }, + perf = { pattern = '%f[%w]()PERF()%f[%W]', group = 'DiagnosticWarn' }, + doc = { pattern = '%f[%w]()DOC()%f[%W]', group = 'DiagnosticWarn' }, + sec = { pattern = '%f[%w]()SEC()%f[%W]', group = 'DiagnosticError' }, + rev = { pattern = '%f[%w]()REV()%f[%W]', group = 'DiagnosticInfo' }, + test = { pattern = '%f[%w]()TEST()%f[%W]', group = 'DiagnosticInfo' }, + deprecated = { pattern = '%f[%w]()DEPRECATED()%f[%W]', group = 'DiagnosticDepreciated' }, + design = { pattern = '%f[%w]()DESIGN()%f[%W]', group = 'DiagnosticWarn' }, + verify = { pattern = '%f[%w]()VERIFY()%f[%W]', group = 'DiagnosticWarn' }, + idea = { pattern = '%f[%w]()IDEA()%f[%W]', group = 'DiagnosticHint' }, + } + } + end, +} diff --git a/Baud/.config/nvim/lua/plugins/mini-move.lua b/Baud/.config/nvim/lua/plugins/mini-move.lua index 56a3443..32590e0 100755 --- a/Baud/.config/nvim/lua/plugins/mini-move.lua +++ b/Baud/.config/nvim/lua/plugins/mini-move.lua @@ -3,12 +3,7 @@ return { "echasnovski/mini.move", - keys = { - '', - '', - '', - '', - }, + event = "VeryLazy", opts = { mappings = { -- Move visual selection diff --git a/Baud/.config/nvim/lua/plugins/nvim-highlight-colors.lua b/Baud/.config/nvim/lua/plugins/nvim-highlight-colors.lua deleted file mode 100755 index 341f366..0000000 --- a/Baud/.config/nvim/lua/plugins/nvim-highlight-colors.lua +++ /dev/null @@ -1,10 +0,0 @@ --- Highlight colours --- https://github.com/brenoprata10/nvim-highlight-colors --- (referenced in nvim-cmp config) - -return { - "brenoprata10/nvim-highlight-colors", - opts = { - enable_tailwind = true, - } -} diff --git a/Baud/.config/nvim/lua/plugins/todo-comments.lua b/Baud/.config/nvim/lua/plugins/todo-comments.lua deleted file mode 100755 index 32ef5f6..0000000 --- a/Baud/.config/nvim/lua/plugins/todo-comments.lua +++ /dev/null @@ -1,40 +0,0 @@ --- Highlight, list and search todo comments --- https://github.com/folke/todo-comments.nvim - -return { - "folke/todo-comments.nvim", - opts = { - keywords = { - TODO = { icon = "󰄬 ", color = "info", alt = { "TO-DO", "TASK" } }, - HACK = { icon = "󰈸 ", color = "warning", alt = { "BODGE", "TEMP", "WORKAROUND" } }, - BUG = { icon = "󰃤 ", color = "error", alt = { "GLITCH", "ISSUE", "PROBLEM", "ERROR" } }, - WARN = { icon = " ", color = "warning", alt = { "WARNING", "CAUTION", "DANGER" } }, - PERF = { - icon = " ", - color = "warning", - alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE", "OPTIMIZATION" }, - }, - DOC = { icon = "󰈙 ", color = "warning", alt = { "DOCUMENTATION", "DOCS" } }, - SEC = { icon = "󰒃 ", color = "error", alt = { "SECURITY", "SECURITYFIX", "VULNERABILITY" } }, - NOTE = { icon = "󰠮 ", color = "hint", alt = { "INFO", "COMMENT", "REMARK" } }, - REV = { icon = "󰅇 ", color = "info", alt = { "REVIEW", "REVISIT", "FEEDBACK" } }, - TEST = { - icon = "󰙨 ", - color = "info", - alt = { "TEST", "TESTNEEDED", "TESTING", "PASSED", "FAILED", "ASSERT" }, - }, - DEPRECATED = { icon = "󱚡 ", color = "warning", alt = { "OBSOLETE", "OUTDATED" } }, - ANALYZE = { icon = " ", color = "warning", alt = { "ANALYSIS", "CHECK" } }, - DESIGN = { icon = "󰏘 ", color = "warning", alt = { "ARCHITECTURE", "STRUCTURE" } }, - VERIFY = { icon = "󰗠 ", color = "warning", alt = { "VALIDATE", "VERIFY" } }, - IDEA = { icon = "󰌵 ", color = "info", alt = { "IDEA", "CONCEPT" } }, - }, - colors = { - error = { "DiagnosticError", "#F13731" }, - warning = { "DiagnosticWarn", "#FFAD1F" }, - info = { "DiagnosticInfo", "#3578C1" }, - hint = { "DiagnosticHint", "#58A551" }, - default = { "Identifier", "#532ca5" }, - }, - } -} diff --git a/Baud/.config/nvim/lua/plugins/treesitter/nvim-treesitter-context.lua b/Baud/.config/nvim/lua/plugins/treesitter/nvim-treesitter-context.lua index eb80624..abe7f30 100755 --- a/Baud/.config/nvim/lua/plugins/treesitter/nvim-treesitter-context.lua +++ b/Baud/.config/nvim/lua/plugins/treesitter/nvim-treesitter-context.lua @@ -3,7 +3,6 @@ return { "nvim-treesitter/nvim-treesitter-context", - opts = { - enable = true, - }, + event = "VeryLazy", + enabled = true, } diff --git a/Baud/.config/nvim/lua/plugins/treesitter/nvim-treesitter.lua b/Baud/.config/nvim/lua/plugins/treesitter/nvim-treesitter.lua index 9d368a7..be17fe5 100755 --- a/Baud/.config/nvim/lua/plugins/treesitter/nvim-treesitter.lua +++ b/Baud/.config/nvim/lua/plugins/treesitter/nvim-treesitter.lua @@ -4,7 +4,8 @@ return { "nvim-treesitter/nvim-treesitter", build = ":TSUpdate", - cmd = { "TSUpdate", "TSUpdateSync", "TSInstall" }, + event = "VeryLazy", + cmd = { "TSUpdateSync", "TSUpdate", "TSInstall" }, lazy = vim.fn.argc(-1) == 0, -- load treesitter early when opening a file from the cmdline opts = { highlight = { enable = true, }, @@ -16,15 +17,20 @@ return { "html", "javascript", "json", + "jsonc", "lua", "markdown", "php", "python", "rust", + "regex", "toml", + "tsx", + "typescript", "sql", "toml", "typescript", + "xml", "yaml", "git_config", "git_rebase", @@ -33,8 +39,4 @@ return { "gitignore", }, }, - config = function() - vim.opt.foldmethod = "expr" - vim.opt.foldexpr = "nvim_treesitter#foldexpr()" - end, }