1
0
Fork 0

nvim: treesitter cleanup

This commit is contained in:
Vladimír Dudr 2022-10-04 10:55:27 +02:00
parent 909fcc62d0
commit ae763be668
2 changed files with 34 additions and 36 deletions

View file

@ -43,7 +43,6 @@ function M.setup()
config = require("configs.treesitter").setup, config = require("configs.treesitter").setup,
} }
use 'nvim-treesitter/playground' use 'nvim-treesitter/playground'
use 'David-Kunz/treesitter-unit'
use({ "yioneko/nvim-yati", requires = "nvim-treesitter/nvim-treesitter" }) use({ "yioneko/nvim-yati", requires = "nvim-treesitter/nvim-treesitter" })
use { 'nvim-telescope/telescope.nvim', use { 'nvim-telescope/telescope.nvim',

View file

@ -3,7 +3,10 @@ local M = {}
function M.setup() function M.setup()
require 'nvim-treesitter.configs'.setup { require 'nvim-treesitter.configs'.setup {
ensure_installed = 'all', -- one of "all", "maintained" (parsers with maintainers), or a list of languages ensure_installed = 'all', -- one of "all", "maintained" (parsers with maintainers), or a list of languages
highlight = { enable = true, }, highlight = {
enable = true,
disable = { "help" },
},
playground = { enable = true, }, playground = { enable = true, },
yati = { enable = true, }, yati = { enable = true, },
incremental_selection = { incremental_selection = {
@ -34,10 +37,6 @@ function M.setup()
filetype = "xml", -- if filetype does not match the parser name filetype = "xml", -- if filetype does not match the parser name
} }
vim.api.nvim_set_keymap('x', 'iu', ':lua require"treesitter-unit".select()<CR>', { noremap = true })
vim.api.nvim_set_keymap('x', 'au', ':lua require"treesitter-unit".select(true)<CR>', { noremap = true })
vim.api.nvim_set_keymap('o', 'iu', ':<c-u>lua require"treesitter-unit".select()<CR>', { noremap = true })
vim.api.nvim_set_keymap('o', 'au', ':<c-u>lua require"treesitter-unit".select(true)<CR>', { noremap = true })
end end
return M return M