Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -874,8 +874,6 @@ require('lazy').setup({
branch = 'main',
-- [[ Configure Treesitter ]] See `:help nvim-treesitter-intro`
config = function()
local parsers = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' }
require('nvim-treesitter').install(parsers)
vim.api.nvim_create_autocmd('FileType', {
callback = function(args)
local buf, filetype = args.buf, args.match
Expand All @@ -899,6 +897,24 @@ require('lazy').setup({
})
end,
},
{ -- Automatically install Treesitter parsers for languages you encounter.

-- NOTE: This plugin is a convenience feature and is not strictly necessary for
-- regular use. If you prefer, you can remove it and install parsers manually
-- directly with treesitter using `require('nvim-treesitter').install()`.
'lewis6991/ts-install.nvim',
dependencies = { 'nvim-treesitter/nvim-treesitter' },
config = function()
local ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' }
vim.list_extend(ensure_installed, {
-- You can add other parsers here that you want to be always installed
})
require('ts-install').setup {
ensure_install = ensure_installed,
auto_install = true,
}
end,
},

-- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the
-- init.lua. If you want these files, they are in the repository, so you can just download them and
Expand Down
Loading