From e258cc1aa3e3cde040c59a66040338384678b2d7 Mon Sep 17 00:00:00 2001 From: Techno Duck Date: Tue, 7 Apr 2026 16:17:13 -0400 Subject: [PATCH 1/2] treesitter moment --- lua/technoduck/init.lua | 22 ++++++++++++++ lua/technoduck/lazy_config.lua | 4 ++- lua/technoduck/lazy_plugins/init.lua | 1 - lua/technoduck/lazy_plugins/lsp.lua | 19 +++++++----- lua/technoduck/lazy_plugins/treesitter.lua | 35 ++++++++++------------ 5 files changed, 51 insertions(+), 30 deletions(-) diff --git a/lua/technoduck/init.lua b/lua/technoduck/init.lua index 86b8e4a..baf9abe 100644 --- a/lua/technoduck/init.lua +++ b/lua/technoduck/init.lua @@ -25,3 +25,25 @@ autocmd('LspAttach', { vim.g.netrw_browse_split = 0 vim.g.netrw_winsize = 25 + + +vim.api.nvim_create_autocmd('FileType', { + pattern = { + 'javascript', + 'typescript', + 'python', + 'rust', + 'c', + 'lua', + 'vim', + 'vimdoc', + 'query', + 'markdown', + 'doxygen' }, + callback = function() + vim.treesitter.start() + -- vim.wo[0][0].foldexpr = 'v:lua.vim.treesitter.foldexpr()' + -- vim.wo[0][0].foldmethod = 'expr' + vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" + end, +}) diff --git a/lua/technoduck/lazy_config.lua b/lua/technoduck/lazy_config.lua index 43bffe1..68ef5f1 100644 --- a/lua/technoduck/lazy_config.lua +++ b/lua/technoduck/lazy_config.lua @@ -12,7 +12,9 @@ end vim.opt.rtp:prepend(lazypath) require("lazy").setup({ - spec = "technoduck.lazy_plugins", + spec = { + {import = "technoduck.lazy_plugins"} + }, change_detection = { notify = false }, rocks = {enabled = false} }) diff --git a/lua/technoduck/lazy_plugins/init.lua b/lua/technoduck/lazy_plugins/init.lua index 4c5761a..67fd47f 100644 --- a/lua/technoduck/lazy_plugins/init.lua +++ b/lua/technoduck/lazy_plugins/init.lua @@ -11,6 +11,5 @@ return { }, - 'nvim-treesitter/playground', 'mbbill/undotree', } diff --git a/lua/technoduck/lazy_plugins/lsp.lua b/lua/technoduck/lazy_plugins/lsp.lua index 9d49817..d7c65e4 100644 --- a/lua/technoduck/lazy_plugins/lsp.lua +++ b/lua/technoduck/lazy_plugins/lsp.lua @@ -31,9 +31,11 @@ return { 'lua_ls', 'rust_analyzer', 'lua_ls', + 'marksman', 'jedi_language_server', 'fortls', 'tinymist', + 'clangd' }, handlers = { function(server_name) @@ -44,10 +46,11 @@ return { vim.lsp.protocol.make_client_capabilities(), cmp_nvim_lsp.default_capabilities()) - require("lspconfig")[server_name].setup { - capabilities = capabilities - } - require'lspconfig'.fortls.setup{ + vim.lsp.config(server_name, { + capabilities = capabilities, + vim.lsp.enable(server_name) + }) + vim.lsp.config('fortls' ,{ cmd = { 'fortls', '--hover_signature', @@ -55,8 +58,8 @@ return { '--use_signature_help', '--lowercase_intrinsics' }, - } - require("lspconfig").lua_ls.setup({ + }) + vim.lsp.config('lua_ls',{ settings = { Lua = { diagnostics = { @@ -72,7 +75,7 @@ return { } } }) - require('lspconfig').tinymist.setup { + vim.lsp.config('tinymist', { settings = { formatterMode = "typstyle", @@ -82,7 +85,7 @@ return { semanticTokens = "disable" } - } + }) end, } }) diff --git a/lua/technoduck/lazy_plugins/treesitter.lua b/lua/technoduck/lazy_plugins/treesitter.lua index 2362c8f..18110cd 100644 --- a/lua/technoduck/lazy_plugins/treesitter.lua +++ b/lua/technoduck/lazy_plugins/treesitter.lua @@ -1,25 +1,20 @@ return { 'nvim-treesitter/nvim-treesitter', - --build = ":TSUpdate", + branch = 'main', + build = ":TSUpdate", + lazy = false, config = function() - require('nvim-treesitter.configs').setup({ - -- A list of parser names, or "all" (the five listed parsers should always be installed) - ensure_installed = {"javascript","typescript","python","rust","c", "lua", "vim", "vimdoc", "query","doxygen" }, + local nvimt = require('nvim-treesitter') - -- Install parsers synchronously (only applied to `ensure_installed`) - sync_install = false, - - -- Automatically install missing parsers when entering buffer - -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally - auto_install = true, - indent = { - enable = true - }, - - highlight = { - enable = true, - - additional_vim_regex_highlighting = false, - }, - }) + nvimt.install({"javascript", + "typescript", + "python", + "rust", + "c", + "lua", + "vim", + "vimdoc", + "query", + "markdown", + 'doxygen' }) end} -- 2.51.2 From d687e23b618ef8a1cd2f6f9df2b8c0f9564e3bfb Mon Sep 17 00:00:00 2001 From: Techno Duck Date: Tue, 7 Apr 2026 17:01:15 -0400 Subject: [PATCH 2/2] markdown frontmatter behaves now --- lua/technoduck/lazy_plugins/treesitter.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/technoduck/lazy_plugins/treesitter.lua b/lua/technoduck/lazy_plugins/treesitter.lua index 18110cd..2d28542 100644 --- a/lua/technoduck/lazy_plugins/treesitter.lua +++ b/lua/technoduck/lazy_plugins/treesitter.lua @@ -14,7 +14,9 @@ return { "lua", "vim", "vimdoc", + "toml", "query", "markdown", + "markdown_inline", 'doxygen' }) end} -- 2.51.2