diff options
Diffstat (limited to 'lua/plugins/general.lua')
| -rw-r--r-- | lua/plugins/general.lua | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/lua/plugins/general.lua b/lua/plugins/general.lua new file mode 100644 index 0000000..f115247 --- /dev/null +++ b/lua/plugins/general.lua @@ -0,0 +1,94 @@ +return { + { + "guess-indent.nvim", + for_cat = "core.general", + event = "DeferredUIEnter", + after = function() + require("guess-indent").setup({ + auto_cmd = true, + override_editorconfig = true, + filetype_exclude = { + "netrw", + "tutor", + "oil", + "gitcommit", + }, + buftype_exclude = { + "help", + "nofile", + "terminal", + "prompt", + }, + on_tab_options = { + ["expandtab"] = false, + }, + on_space_options = { + ["expandtab"] = true, + ["tabstop"] = "detected", + ["softtabstop"] = "detected", + ["shiftwidth"] = "detected", + }, + }) + end, + }, + { + "nvim-surround", + for_cat = "core.general", + event = { "BufReadPre", "BufNewFile" }, + after = function() + require("nvim-surround").setup() + end, + }, + { + "oil.nvim", + keys = { { "<leader>o", "<CMD>Oil<CR>", desc = "Open oil" } }, + for_cat = "core.general", + after = function() + require("oil").setup({ + default_file_explorer = true, + columns = { "icon", "permissions", "size" }, + keymaps = { + ["-"] = "actions.parent", + ["<CR>"] = "actions.select", + ["<C-v>"] = "actions.select_vsplit", + ["<C-s>"] = "actions.select_split", + }, + }) + end, + }, + { + "undotree", + for_cat = "core.general", + cmd = { "UndotreeToggle", "UndotreeHide", "UndotreeShow", "UndotreeFocus", "UndotreePersistUndo" }, + keys = { { "<leader>U", "<cmd>UndotreeToggle<CR>", mode = { "n" }, desc = "Undo Tree" } }, + before = function(_) + vim.g.undotree_WindowLayout = 1 + vim.g.undotree_SplitWidth = 40 + vim.g.undotree_WindowLayout = 3 + end, + }, + { + "lazydev.nvim", + ft = "lua", + after = function() + require("lazydev").setup({ + library = { + { path = "${3rd}/luv/library", words = { "vim%.uv" } }, + }, + + integrations = { + -- Fixes lspconfig's workspace management for LuaLS + -- Only create a new workspace if the buffer is not part + -- of an existing workspace or one of its libraries + lspconfig = true, + -- add the cmp source for completion of: + -- `require "modname"` + -- `---@module "modname"` + cmp = true, + -- same, but for Coq + coq = false, + }, + }) + end, + }, +} |
