nvim bugfixes
This commit is contained in:
parent
0581347edf
commit
860a47e3fb
3 changed files with 23 additions and 36 deletions
|
@ -1,13 +0,0 @@
|
||||||
local M = {}
|
|
||||||
|
|
||||||
M.ensure = {
|
|
||||||
treesitter = {
|
|
||||||
"bash",
|
|
||||||
"c",
|
|
||||||
"dockerfile",
|
|
||||||
"git_config",
|
|
||||||
"git_ignore",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return M
|
|
|
@ -23,10 +23,9 @@ M.opts = function()
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
M.config = function(plug, opts)
|
M.config = function(_, opts)
|
||||||
local name = require("lazy.core.loader").get_main(plug)
|
local m = require("telescope")
|
||||||
local m = require(name)
|
local actions = require("telescope.actions")
|
||||||
local actions = require(name .. ".actions")
|
|
||||||
opts.mappings = require("config.keymaps").telescope(actions)
|
opts.mappings = require("config.keymaps").telescope(actions)
|
||||||
m.setup(opts)
|
m.setup(opts)
|
||||||
m.load_extension("aerial")
|
m.load_extension("aerial")
|
||||||
|
|
|
@ -1,38 +1,39 @@
|
||||||
local M = { "nvim-treesitter/nvim-treesitter" }
|
local M = { "nvim-treesitter/nvim-treesitter" }
|
||||||
|
|
||||||
M.event = { "BufReadPost", "BufNewFile", "BufNew" }
|
|
||||||
|
|
||||||
M.build = ":TSUpdate"
|
M.build = ":TSUpdate"
|
||||||
|
|
||||||
M.cmd = {
|
M.event = { "BufReadPost", "BufNewFile", "BufNew" }
|
||||||
"TSBufDisable",
|
|
||||||
"TSBufEnable",
|
-- M.cmd = {
|
||||||
"TSBufToggle",
|
-- "TSBufDisable",
|
||||||
"TSDisable",
|
-- "TSBufEnable",
|
||||||
"TSEnable",
|
-- "TSBufToggle",
|
||||||
"TSToggle",
|
-- "TSDisable",
|
||||||
"TSInstall",
|
-- "TSEnable",
|
||||||
"TSInstallInfo",
|
-- "TSToggle",
|
||||||
"TSInstallSync",
|
-- "TSInstall",
|
||||||
"TSModuleInfo",
|
-- "TSInstallInfo",
|
||||||
"TSUninstall",
|
-- "TSInstallSync",
|
||||||
"TSUpdate",
|
-- "TSModuleInfo",
|
||||||
"TSUpdateSync",
|
-- "TSUninstall",
|
||||||
}
|
-- "TSUpdate",
|
||||||
|
-- "TSUpdateSync",
|
||||||
|
-- }
|
||||||
|
|
||||||
M.init = function(plugin)
|
M.init = function(plugin)
|
||||||
require("lazy.core.loader").add_to_rtp(plugin)
|
require("lazy.core.loader").add_to_rtp(plugin)
|
||||||
require("nvim-treesitter.query_predicates")
|
require("nvim-treesitter.query_predicates")
|
||||||
|
require("nvim-treesitter.install").setup_auto_install()
|
||||||
end
|
end
|
||||||
|
|
||||||
local maps = require("config.keymaps").treesitter
|
local maps = require("config.keymaps").treesitter
|
||||||
M.opts = {
|
M.opts = {
|
||||||
ensure_installed = { "lua", "yaml", "json", "bash" },
|
|
||||||
autotag = { enable = true },
|
autotag = { enable = true },
|
||||||
highlight = {
|
highlight = {
|
||||||
enable = true,
|
enable = true,
|
||||||
},
|
},
|
||||||
auto_install = true,
|
-- HACK: this doesn't work for some reason, so I manually call it in M.init
|
||||||
|
-- auto_install = true,
|
||||||
autopairs = {
|
autopairs = {
|
||||||
enable = false,
|
enable = false,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue