1
0
Fork 0

nvim: fix xml

This commit is contained in:
Vladimír Dudr 2023-09-02 16:08:48 +02:00
parent 6773555c70
commit 0ff9a94992
4 changed files with 16 additions and 11 deletions

View file

@ -19,6 +19,7 @@ local M = {
{ '<Space>Tj', [[<Cmd>Telescope jumplist<CR>]], desc = 'Telescope jumplist' },
{ '<Space>Th', [[<Cmd>Telescope help_tags<CR>]], desc = 'Telescope help' },
{ '<Space>TT', [[<Cmd>Telescope resume<CR>]], desc = 'Telescope resume' },
{ '<Space>Ts', [[<Cmd>Telescope lsp_document_symbols<CR>]], desc = 'Telescope document symbols' },
},
}
@ -29,6 +30,8 @@ function M.config()
local opts = {
defaults = {
layout_config = { prompt_position = 'top' },
sorting_strategy = "ascending",
preview = {
hide_on_startup = true,
},

View file

@ -61,17 +61,17 @@ end
function M.config()
local ts_parsers = require 'nvim-treesitter.parsers'.get_parser_configs()
ts_parsers.xml = {
install_info = {
url = 'https://github.com/dorgnarg/tree-sitter-xml', -- local path or git repo
files = { 'src/parser.c' },
-- optional entries:
branch = 'main', -- default branch in case of git repo if different from master
generate_requires_npm = false, -- if stand-alone parser without npm dependencies
requires_generate_from_grammar = true, -- if folder contains pre-generated src/parser.c
},
filetype = 'xml', -- if filetype does not match the parser name
}
-- ts_parsers.xml = {
-- install_info = {
-- url = 'https://github.com/dorgnarg/tree-sitter-xml', -- local path or git repo
-- files = { 'src/parser.c' },
-- -- optional entries:
-- branch = 'main', -- default branch in case of git repo if different from master
-- generate_requires_npm = false, -- if stand-alone parser without npm dependencies
-- requires_generate_from_grammar = true, -- if folder contains pre-generated src/parser.c
-- },
-- filetype = 'xml', -- if filetype does not match the parser name
-- }
ts_parsers.just = {
install_info = {
url = 'https://github.com/IndianBoy42/tree-sitter-just', -- local path or git repo
@ -84,6 +84,8 @@ function M.config()
require 'nvim-treesitter.configs'.setup {
ensure_installed = 'all', -- one of "all", "maintained" (parsers with maintainers), or a list of languages
ignore_install = {},
auto_install = true,
sync_install = false,
highlight = {
enable = true,