My neovim config
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix treesitter

+43 -13
+30 -5
init.lua
··· 8 8 { src = "https://github.com/windwp/nvim-autopairs" }, 9 9 { src = "https://github.com/j-hui/fidget.nvim" }, 10 10 { src = "https://github.com/folke/todo-comments.nvim" }, 11 + { src = "https://github.com/nvim-treesitter/nvim-treesitter", version = "main" }, 11 12 12 13 -- { src = "https://github.com/numToStr/Comment.nvim" }, 13 14 ··· 212 213 -- 213 214 214 215 local setup_treesitter = function() 215 - for _, lang in ipairs(ensure_installed.treesitter) do 216 - vim.treesitter.language.add(lang) 217 - end 216 + local parsers = ensure_installed.treesitter 217 + 218 + require("nvim-treesitter.install").ensure_installed(parsers) 219 + vim.api.nvim_create_autocmd("FileType", { 220 + callback = function(args) 221 + local buf, filetype = args.buf, args.match 222 + 223 + local language = vim.treesitter.language.get_lang(filetype) 224 + if not language then 225 + return 226 + end 227 + 228 + -- check if parser exists and load it 229 + if not vim.treesitter.language.add(language) then 230 + return 231 + end 232 + -- enables syntax highlighting and other treesitter features 233 + vim.treesitter.start(buf, language) 234 + 235 + -- enables treesitter based folds 236 + -- for more info on folds see `:help folds` 237 + -- vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()' 238 + -- vim.wo.foldmethod = 'expr' 239 + 240 + -- enables treesitter based indentation 241 + vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" 242 + end, 243 + }) 218 244 end 219 245 220 246 local setup_mason_and_lsp = function() ··· 250 276 -- Plugin setup 251 277 setup_mason_and_lsp() 252 278 setup_blink() 279 + setup_treesitter() 253 280 254 281 setup_oil() 255 282 setup_hop() 256 - setup_treesitter() 257 283 setup_conform() 258 284 keymaps() 259 285 ··· 261 287 require("todo-comments").setup({ signs = false }) 262 288 263 289 require("debug") 264 -
+13 -8
nvim-pack-lock.json
··· 10 10 "version": "'v1.9.1'" 11 11 }, 12 12 "conform.nvim": { 13 - "rev": "c2526f1cde528a66e086ab1668e996d162c75f4f", 13 + "rev": "086a40dc7ed8242c03be9f47fbcee68699cc2395", 14 14 "src": "https://github.com/stevearc/conform.nvim" 15 15 }, 16 16 "everforest": { ··· 26 26 "src": "https://github.com/rafamadriz/friendly-snippets" 27 27 }, 28 28 "gitsigns.nvim": { 29 - "rev": "7c4faa3540d0781a28588cafbd4dd187a28ac6e3", 29 + "rev": "50c205548d8b037b7ff6378fca6d21146f0b6161", 30 30 "src": "https://github.com/lewis6991/gitsigns.nvim" 31 31 }, 32 32 "gruvbox-material": { ··· 42 42 "src": "https://github.com/smoka7/hop.nvim" 43 43 }, 44 44 "mason-lspconfig.nvim": { 45 - "rev": "ae609525ddf01c153c39305730b1791800ffe4fe", 45 + "rev": "037398b9ce4a53ba48d5f94765c641a1fd16d906", 46 46 "src": "https://github.com/mason-org/mason-lspconfig.nvim.git" 47 47 }, 48 48 "mason.nvim": { ··· 50 50 "src": "https://github.com/mason-org/mason.nvim.git" 51 51 }, 52 52 "mini.icons": { 53 - "rev": "efc85e42262cd0c9e1fdbf806c25cb0be6de115c", 53 + "rev": "5b9076dae1bfbe47ba4a14bc8b967cde0ab5d77e", 54 54 "src": "https://github.com/nvim-mini/mini.icons" 55 55 }, 56 56 "mini.pick": { 57 - "rev": "4ad37ade984e69c43227b82ccdca5a92a22886de", 57 + "rev": "fe079c2bd894a5ee70b62f23d819620ef40c4949", 58 58 "src": "https://github.com/nvim-mini/mini.pick" 59 59 }, 60 60 "nvim-autopairs": { ··· 66 66 "src": "https://github.com/olrtg/nvim-emmet" 67 67 }, 68 68 "nvim-lspconfig": { 69 - "rev": "66fd02ad1c7ea31616d3ca678fa04e6d0b360824", 69 + "rev": "16812abf0e8d8175155f26143a8504e8253e92b0", 70 70 "src": "https://github.com/neovim/nvim-lspconfig.git" 71 71 }, 72 + "nvim-treesitter": { 73 + "rev": "cf12346a3414fa1b06af75c79faebe7f76df080a", 74 + "src": "https://github.com/nvim-treesitter/nvim-treesitter", 75 + "version": "'main'" 76 + }, 72 77 "nvim-vtsls": { 73 78 "rev": "0b5f73c9e50ce95842ea07bb3f05c7d66d87d14a", 74 79 "src": "https://github.com/yioneko/nvim-vtsls" 75 80 }, 76 81 "oil.nvim": { 77 - "rev": "f55b25e493a7df76371cfadd0ded5004cb9cd48a", 82 + "rev": "0fcc83805ad11cf714a949c98c605ed717e0b83e", 78 83 "src": "https://github.com/stevearc/oil.nvim" 79 84 }, 80 85 "osmium": { ··· 102 107 "src": "https://github.com/pmizio/typescript-tools.nvim" 103 108 }, 104 109 "vague.nvim": { 105 - "rev": "c1ab4d4891ff3a27deba6a80222d895ac8ffb2e5", 110 + "rev": "8c4643f8a5106dbc492918f86ff6b5c81111ce9a", 106 111 "src": "https://github.com/vague-theme/vague.nvim" 107 112 } 108 113 }