mirror of
https://github.com/d0zingcat/dotfiles.git
synced 2026-05-14 07:26:44 +00:00
@@ -1,4 +1,50 @@
|
||||
-- treesitter
|
||||
local ncmd = vim.api.nvim_command
|
||||
|
||||
require('nvim-treesitter.configs').setup({
|
||||
ensure_installed = { 'rust', 'go', 'python', 'lua', 'c' }, -- one of "all", "maintained" (parsers with maintainers), or a list of languages
|
||||
ensure_installed = { 'c', 'lua', 'rust', 'go', 'python', 'zig', 'markdown', 'solidity', 'jsonnet', 'vim' },
|
||||
highlight = {
|
||||
enable = true,
|
||||
},
|
||||
playground = {
|
||||
enable = true,
|
||||
},
|
||||
query_linter = {
|
||||
enable = true,
|
||||
use_virtual_text = true,
|
||||
lint_events = { 'BufWrite', 'CursorHold' },
|
||||
},
|
||||
-- nvim-treesitter/nvim-treesitter-refactor
|
||||
refactor = {
|
||||
highlight_definitions = { enable = true },
|
||||
smart_rename = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
smart_rename = 'gnr',
|
||||
},
|
||||
},
|
||||
},
|
||||
indent = { enable = false },
|
||||
autopairs = { enable = true },
|
||||
rainbow = { enable = true },
|
||||
autotag = { enable = true },
|
||||
context_commentstring = { enable = true },
|
||||
-- RRethy/nvim-treesitter-endwise
|
||||
endwise = {
|
||||
enable = true,
|
||||
},
|
||||
-- andymass/vim-matchup
|
||||
matchup = {
|
||||
enable = true,
|
||||
},
|
||||
-- nvim-treesitter/nvim-treesitter-textobjects
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true,
|
||||
},
|
||||
},
|
||||
-- yioneko/nvim-yati
|
||||
yati = { enable = true },
|
||||
})
|
||||
ncmd('set foldmethod=expr')
|
||||
ncmd('set foldexpr=nvim_treesitter#foldexpr()')
|
||||
|
||||
@@ -145,6 +145,16 @@ return require('packer').startup(function(use)
|
||||
config = function()
|
||||
require('config.nvim_treesitter')
|
||||
end,
|
||||
requires = {
|
||||
'nvim-treesitter/playground',
|
||||
'nvim-treesitter/nvim-treesitter-refactor',
|
||||
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||
'nvim-treesitter/nvim-treesitter-context',
|
||||
'RRethy/nvim-treesitter-endwise',
|
||||
'andymass/vim-matchup', -- extend % key
|
||||
'yioneko/nvim-yati',
|
||||
'm-demare/hlargs.nvim',
|
||||
},
|
||||
})
|
||||
use({
|
||||
'iamcco/markdown-preview.nvim',
|
||||
|
||||
Reference in New Issue
Block a user