dotfiles/nvim/.config/nvim/lua/treesitter.lua
Sanchayan Maity 8a60e83ef5
nvim: plugins/treesitter: Drop playground
Initially added this thinking it might help with our own colorscheme
but we have never used this.
2023-02-28 00:05:45 +05:30

19 lines
814 B
Lua

local ts_langs = { "bash", "cpp", "fennel", "fish", "go", "haskell", "html", "java", "javascript", "jsdoc", "json", "markdown", "nix", "python", "query", "racket", "rust", "scheme", "teal", "toml", "tsx", "typescript", "verilog" }
require'nvim-treesitter.install'.compilers = { "gcc" }
require'nvim-treesitter.configs'.setup {
ensure_installed = ts_langs,
highlight = { enable = true, },
query_linter = {
enable = true,
use_virtual_text = true,
lint_events = { "BufWrite", "CursorHold" },
},
matchup = {
enable = true,
},
}
vim.keymap.set('o', '<Leader>m', ':<C-U>lua require(\'tsht\').nodes()<CR>', { noremap=false, unique=true, silent=true })
vim.keymap.set('x', '<Leader>m', ':lua require(\'tsht\').nodes()<CR>' , { noremap=true , unique=true, silent=true })