diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index a03ba39..b437f02 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -1,4 +1,4 @@ --- if true then return {} end +if true then return {} end -- Customize Treesitter ---@type LazySpec @@ -10,11 +10,24 @@ return { "vim", "markdown", -- add more arguments for adding more treesitter parsers - "selinux", }, highlight = { enable = true, }, }, + config = function() + local parser_config = require("nvim-treesitter.parsers").get_parser_configs() + + parser_config["selinux"] = { + install_info = { + url = "~/code/tree-sitter-selinux/", + files = { "src/parser.c" }, + branch = "main", + generate_requires_npm = false, + requires_generate_from_grammar = false, + }, + filetype = "te", + } + end, } diff --git a/lua/plugins/user.lua b/lua/plugins/user.lua index 58de26c..191d904 100644 --- a/lua/plugins/user.lua +++ b/lua/plugins/user.lua @@ -155,11 +155,11 @@ return { -- require("nvim-surround").setup { opts = { keymaps = { - normal = "gs", + normal = ",s", normal_line = "gS", - delete = "dgs", - visual = "gs", - visual_line = "gS", + delete = "d,s", + visual = ",S", + visual_line = ",S", change = "cgs", change_line = "cgS", },