1
0
Fork 0

nvim bugfixes

This commit is contained in:
Luca Bilke 2024-03-10 17:04:58 +01:00
parent 0581347edf
commit 860a47e3fb
3 changed files with 23 additions and 36 deletions

View File

@ -1,13 +0,0 @@
local M = {}
M.ensure = {
treesitter = {
"bash",
"c",
"dockerfile",
"git_config",
"git_ignore",
}
}
return M

View File

@ -23,10 +23,9 @@ M.opts = function()
}
end
M.config = function(plug, opts)
local name = require("lazy.core.loader").get_main(plug)
local m = require(name)
local actions = require(name .. ".actions")
M.config = function(_, opts)
local m = require("telescope")
local actions = require("telescope.actions")
opts.mappings = require("config.keymaps").telescope(actions)
m.setup(opts)
m.load_extension("aerial")

View File

@ -1,38 +1,39 @@
local M = { "nvim-treesitter/nvim-treesitter" }
M.event = { "BufReadPost", "BufNewFile", "BufNew" }
M.build = ":TSUpdate"
M.cmd = {
"TSBufDisable",
"TSBufEnable",
"TSBufToggle",
"TSDisable",
"TSEnable",
"TSToggle",
"TSInstall",
"TSInstallInfo",
"TSInstallSync",
"TSModuleInfo",
"TSUninstall",
"TSUpdate",
"TSUpdateSync",
}
M.event = { "BufReadPost", "BufNewFile", "BufNew" }
-- M.cmd = {
-- "TSBufDisable",
-- "TSBufEnable",
-- "TSBufToggle",
-- "TSDisable",
-- "TSEnable",
-- "TSToggle",
-- "TSInstall",
-- "TSInstallInfo",
-- "TSInstallSync",
-- "TSModuleInfo",
-- "TSUninstall",
-- "TSUpdate",
-- "TSUpdateSync",
-- }
M.init = function(plugin)
require("lazy.core.loader").add_to_rtp(plugin)
require("nvim-treesitter.query_predicates")
require("nvim-treesitter.install").setup_auto_install()
end
local maps = require("config.keymaps").treesitter
M.opts = {
ensure_installed = { "lua", "yaml", "json", "bash" },
autotag = { enable = true },
highlight = {
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 = {
enable = false,
},