Make all plugin configs return a function
Simplifies writing the `config = ...` field for each plugin
This commit is contained in:
+3
-3
@@ -266,8 +266,8 @@ function P.setup_server(self, name)
|
||||
self:reload_server_buf(name)
|
||||
end
|
||||
|
||||
function P.setup(self)
|
||||
self._setup_diagnostics()
|
||||
function P.setup()
|
||||
P._setup_diagnostics()
|
||||
|
||||
utils.try_require("cmp_nvim_lsp", package_name, function (mod)
|
||||
P.capabilities = mod.default_capabilities()
|
||||
@@ -276,7 +276,7 @@ function P.setup(self)
|
||||
utils.try_require("mason-lspconfig", package_name, function (mod)
|
||||
mod.setup_handlers({
|
||||
function (name)
|
||||
self:setup_server(name)
|
||||
P:setup_server(name)
|
||||
end,
|
||||
})
|
||||
end)
|
||||
|
||||
+29
-29
@@ -30,14 +30,14 @@ local plugins = {
|
||||
"rcarriga/nvim-notify",
|
||||
priority = 900,
|
||||
lazy = false,
|
||||
config = function () require("plugins.notify") end,
|
||||
config = require("plugins.notify"),
|
||||
},
|
||||
{
|
||||
"rafamadriz/friendly-snippets",
|
||||
},
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
config = function () require("plugins.luasnip") end,
|
||||
config = require("plugins.luasnip"),
|
||||
-- comment out on windows and install jsregexp manually
|
||||
build = (
|
||||
require("utils").os_name ~= "Windows_NT"
|
||||
@@ -48,7 +48,7 @@ local plugins = {
|
||||
},
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
config = function () require("plugins.autopairs") end,
|
||||
config = require("plugins.autopairs"),
|
||||
},
|
||||
{
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
@@ -70,63 +70,63 @@ local plugins = {
|
||||
},
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
config = function () require("plugins.cmp") end,
|
||||
config = require("plugins.cmp"),
|
||||
},
|
||||
{
|
||||
"onsails/lspkind.nvim",
|
||||
config = function () require("plugins.lspkind") end,
|
||||
config = require("plugins.lspkind"),
|
||||
},
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
config = function () require("plugins.mason") end,
|
||||
config = require("plugins.mason"),
|
||||
lazy = true,
|
||||
event = "VimEnter",
|
||||
},
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
config = function () require("plugins.mason_lspconfig") end,
|
||||
config = require("plugins.mason_lspconfig"),
|
||||
lazy = true,
|
||||
event = "VimEnter",
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function () require("lsp"):setup() end,
|
||||
config = require("lsp").setup,
|
||||
lazy = true,
|
||||
ft = require("lsp"):filetypes(),
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
config = function () require("plugins.treesitter") end,
|
||||
config = require("plugins.treesitter"),
|
||||
build = ":TSUpdate",
|
||||
lazy = true,
|
||||
event = "VimEnter",
|
||||
},
|
||||
{
|
||||
"mfussenegger/nvim-dap",
|
||||
config = function () require("plugins.dap") end,
|
||||
config = require("plugins.dap").setup,
|
||||
lazy = true,
|
||||
ft = require("lsp"):filetypes(),
|
||||
},
|
||||
{
|
||||
"rcarriga/nvim-dap-ui",
|
||||
config = function () require("plugins.dap_ui") end,
|
||||
config = require("plugins.dap_ui"),
|
||||
dependencies = {
|
||||
"mfussenegger/nvim-dap",
|
||||
},
|
||||
},
|
||||
{
|
||||
"tpope/vim-fugitive",
|
||||
config = function () require("plugins.fugitive") end,
|
||||
config = require("plugins.fugitive"),
|
||||
lazy = true,
|
||||
event = "VimEnter",
|
||||
},
|
||||
{
|
||||
"rbong/vim-flog",
|
||||
config = function () require("plugins.flog") end,
|
||||
config = require("plugins.flog"),
|
||||
},
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
config = function () require("plugins.lualine") end,
|
||||
config = require("plugins.lualine"),
|
||||
lazy = true,
|
||||
event = "VimEnter",
|
||||
dependencies = {
|
||||
@@ -135,13 +135,13 @@ local plugins = {
|
||||
},
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
config = function () require("plugins.gitsigns") end,
|
||||
config = require("plugins.gitsigns"),
|
||||
lazy = true,
|
||||
event = "VimEnter",
|
||||
},
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
config = function () require("plugins.telescope") end,
|
||||
config = require("plugins.telescope"),
|
||||
lazy = true,
|
||||
event = "VimEnter",
|
||||
dependencies = {
|
||||
@@ -150,25 +150,25 @@ local plugins = {
|
||||
},
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
config = function () require("plugins.comment") end,
|
||||
config = require("plugins.comment"),
|
||||
lazy = true,
|
||||
event = "VimEnter",
|
||||
},
|
||||
{
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
config = function () require("plugins.indent-blankline") end,
|
||||
config = require("plugins.indent-blankline"),
|
||||
lazy = true,
|
||||
event = "VimEnter",
|
||||
},
|
||||
{
|
||||
"simeji/winresizer",
|
||||
config = function () require("plugins.winresizer") end,
|
||||
config = require("plugins.winresizer"),
|
||||
lazy = true,
|
||||
keys = { "<C-W>r", },
|
||||
},
|
||||
{
|
||||
"sindrets/winshift.nvim",
|
||||
config = function () require("plugins.winshift") end,
|
||||
config = require("plugins.winshift"),
|
||||
lazy = true,
|
||||
keys = { "<C-W>m", },
|
||||
},
|
||||
@@ -179,7 +179,7 @@ local plugins = {
|
||||
},
|
||||
{
|
||||
"kyazdani42/nvim-tree.lua",
|
||||
config = function () require("plugins.tree") end,
|
||||
config = require("plugins.tree"),
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
@@ -191,7 +191,7 @@ local plugins = {
|
||||
},
|
||||
{
|
||||
"stevearc/aerial.nvim",
|
||||
config = function () require("plugins.aerial") end,
|
||||
config = require("plugins.aerial"),
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
@@ -199,23 +199,23 @@ local plugins = {
|
||||
},
|
||||
{
|
||||
"RubixDev/mason-update-all",
|
||||
config = function () require("plugins.mason_update_all") end,
|
||||
config = require("plugins.mason_update_all"),
|
||||
},
|
||||
{
|
||||
"famiu/bufdelete.nvim",
|
||||
config = function () require("plugins.bufdelete") end,
|
||||
config = require("plugins.bufdelete"),
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter-context",
|
||||
config = function () require("plugins.treesitter-context") end,
|
||||
config = require("plugins.treesitter-context"),
|
||||
},
|
||||
{
|
||||
"fedepujol/move.nvim",
|
||||
config = function () require("plugins.move") end,
|
||||
config = require("plugins.move"),
|
||||
},
|
||||
{
|
||||
"nvim-orgmode/orgmode",
|
||||
config = function () require("plugins.orgmode") end,
|
||||
config = require("plugins.orgmode"),
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
},
|
||||
@@ -225,7 +225,7 @@ local plugins = {
|
||||
},
|
||||
{
|
||||
"sindrets/diffview.nvim",
|
||||
config = function () require("plugins.diffview") end,
|
||||
config = require("plugins.diffview"),
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
@@ -233,7 +233,7 @@ local plugins = {
|
||||
{
|
||||
"iamcco/markdown-preview.nvim",
|
||||
build = "cd app && npm install",
|
||||
config = function () require("plugins.markdown-preview") end,
|
||||
config = require("plugins.markdown-preview"),
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
-- https://github.com/stevearc/aerial.nvim
|
||||
|
||||
local function setup()
|
||||
require("aerial").setup({
|
||||
layout = {
|
||||
min_width = 40,
|
||||
@@ -33,3 +34,6 @@ require("aerial").setup({
|
||||
end,
|
||||
show_guides = true,
|
||||
})
|
||||
end
|
||||
|
||||
return setup
|
||||
|
||||
@@ -16,6 +16,10 @@
|
||||
|
||||
-- https://github.com/windwp/nvim-autopairs
|
||||
|
||||
local function setup()
|
||||
require("nvim-autopairs").setup({
|
||||
fast_wrap = {},
|
||||
})
|
||||
end
|
||||
|
||||
return setup
|
||||
|
||||
@@ -16,9 +16,13 @@
|
||||
|
||||
-- https://github.com/famiu/bufdelete.nvim
|
||||
|
||||
local function setup()
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<C-w>q",
|
||||
vim.cmd.Bwipeout,
|
||||
{ remap = false, silent = true, }
|
||||
)
|
||||
end
|
||||
|
||||
return setup
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
-- https://github.com/catppuccin/nvim
|
||||
|
||||
local function setup()
|
||||
local catppuccin = require("catppuccin")
|
||||
|
||||
-- Sometimes requires running :CatppuccinCompile,
|
||||
@@ -70,3 +71,6 @@ catppuccin.setup({
|
||||
})
|
||||
|
||||
catppuccin.load()
|
||||
end
|
||||
|
||||
return setup
|
||||
|
||||
+10
-4
@@ -16,9 +16,7 @@
|
||||
|
||||
-- https://github.com/hrsh7th/nvim-cmp
|
||||
|
||||
local module_name = "plugins.config.cmp"
|
||||
|
||||
local has_words_before = function ()
|
||||
local function has_words_before()
|
||||
unpack = unpack or table.unpack
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0
|
||||
@@ -27,6 +25,8 @@ local has_words_before = function ()
|
||||
:match("%s") == nil
|
||||
end
|
||||
|
||||
local function setup()
|
||||
local module_name = "plugins.config.cmp"
|
||||
local utils = require("utils")
|
||||
local cmp = require("cmp")
|
||||
local luasnip = require("luasnip")
|
||||
@@ -158,7 +158,10 @@ cmp.setup.cmdline(
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources(
|
||||
{ { name = "path", }, },
|
||||
{ { name = "cmdline", option = { ignore_cmds = { "Man", "!", }, }, }, }
|
||||
{ {
|
||||
name = "cmdline",
|
||||
option = { ignore_cmds = { "Man", "!", }, },
|
||||
}, }
|
||||
),
|
||||
}
|
||||
)
|
||||
@@ -173,3 +176,6 @@ utils.try_require(
|
||||
)
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
return setup
|
||||
|
||||
@@ -16,9 +16,13 @@
|
||||
|
||||
-- https://github.com/numToStr/Comment.nvim
|
||||
|
||||
local function setup()
|
||||
require("Comment").setup(
|
||||
{
|
||||
--ignore empty lines
|
||||
ignore = "^$",
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
return setup
|
||||
|
||||
+22
-17
@@ -16,29 +16,25 @@
|
||||
|
||||
-- https://github.com/mfussenegger/nvim-dap
|
||||
|
||||
local dap = require("dap")
|
||||
|
||||
vim.keymap.set("n", "<F5>", dap.continue)
|
||||
vim.keymap.set("n", "<F10>", dap.step_over)
|
||||
vim.keymap.set("n", "<F11>", dap.step_into)
|
||||
vim.keymap.set("n", "<F12>", dap.step_out)
|
||||
|
||||
local utils = require("utils")
|
||||
|
||||
local M = {}
|
||||
|
||||
local env_ok = false
|
||||
M.env_ok = false
|
||||
|
||||
function M.check_env()
|
||||
local utils = require("utils")
|
||||
|
||||
local function check_env()
|
||||
utils.assert_installed("python3")
|
||||
utils.assert_python3_module_installed("debugpy")
|
||||
env_ok = true
|
||||
M.env_ok = true
|
||||
end
|
||||
|
||||
local function start(config)
|
||||
if not env_ok then
|
||||
check_env()
|
||||
function M.start(config)
|
||||
local dap = require("dap")
|
||||
|
||||
if not M.env_ok then
|
||||
M:check_env()
|
||||
end
|
||||
|
||||
dap.adapters.python = {
|
||||
type = "executable",
|
||||
command = "python",
|
||||
@@ -65,7 +61,7 @@ function M.launch(args)
|
||||
console = "integratedTerminal",
|
||||
args = args,
|
||||
}
|
||||
start(config)
|
||||
M.start(config)
|
||||
end
|
||||
|
||||
function M.pytest(args)
|
||||
@@ -83,9 +79,17 @@ function M.pytest(args)
|
||||
console = "integratedTerminal",
|
||||
-- program = "${file}";
|
||||
}
|
||||
start(config)
|
||||
M.start(config)
|
||||
end
|
||||
|
||||
function M.setup()
|
||||
local dap = require("dap")
|
||||
|
||||
vim.keymap.set("n", "<F5>", dap.continue)
|
||||
vim.keymap.set("n", "<F10>", dap.step_over)
|
||||
vim.keymap.set("n", "<F11>", dap.step_into)
|
||||
vim.keymap.set("n", "<F12>", dap.step_out)
|
||||
|
||||
--[[
|
||||
TODO: Add this after loading dap for integrating catppuccin:
|
||||
local sign = vim.fn.sign_define
|
||||
@@ -94,5 +98,6 @@ end
|
||||
sign("DapBreakpointCondition", { text = "●", texthl = "DapBreakpointCondition", linehl = "", numhl = ""})
|
||||
sign("DapLogPoint", { text = "◆", texthl = "DapLogPoint", linehl = "", numhl = ""})
|
||||
--]]
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
-- https://github.com/rcarriga/nvim-dap-ui
|
||||
|
||||
local function setup()
|
||||
require("dapui").setup({
|
||||
icons = { expanded = "▾", collapsed = "▸", },
|
||||
mappings = {
|
||||
@@ -57,3 +58,6 @@ require("dapui").setup({
|
||||
},
|
||||
windows = { indent = 1, },
|
||||
})
|
||||
end
|
||||
|
||||
return setup
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
-- https://github.com/sindrets/diffview.nvim
|
||||
|
||||
local function setup()
|
||||
local actions = require("diffview.actions")
|
||||
|
||||
require("diffview").setup({
|
||||
@@ -85,3 +86,6 @@ require("diffview").setup({
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>gg", vim.cmd.DiffviewOpen)
|
||||
end
|
||||
|
||||
return setup
|
||||
|
||||
@@ -16,4 +16,8 @@
|
||||
|
||||
-- https://github.com/rbong/vim-flog
|
||||
|
||||
local function setup()
|
||||
vim.keymap.set("n", "<leader>gl", vim.cmd.Flog)
|
||||
end
|
||||
|
||||
return setup
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
-- https://github.com/tpope/vim-fugitive
|
||||
|
||||
local function setup()
|
||||
local function git_status_tab()
|
||||
vim.cmd.tabnew()
|
||||
vim.cmd("leftabove vertical G")
|
||||
@@ -32,3 +33,6 @@ vim.keymap.set("n", "<leader>gp", function () vim.cmd.G("push") end)
|
||||
if not pcall(require, "diffview") then
|
||||
vim.keymap.set("n", "<leader>gg", git_status_tab)
|
||||
end
|
||||
end
|
||||
|
||||
return setup
|
||||
|
||||
@@ -16,12 +16,14 @@
|
||||
|
||||
-- https://github.com/lewis6991/gitsigns.nvim
|
||||
|
||||
local function setup()
|
||||
require("gitsigns").setup({
|
||||
on_attach = function (bufnr)
|
||||
local gs = package.loaded.gitsigns
|
||||
vim.keymap.set("n", "<leader>gv", gs.select_hunk, { buffer = bufnr, })
|
||||
vim.keymap.set("n", "<leader>gs", gs.stage_hunk, { buffer = bufnr, })
|
||||
vim.keymap.set("n", "<leader>gu", gs.undo_stage_hunk, { buffer = bufnr, })
|
||||
vim.keymap.set("n", "<leader>gu", gs.undo_stage_hunk,
|
||||
{ buffer = bufnr, })
|
||||
vim.keymap.set("n", "<leader>gr", gs.reset_hunk, { buffer = bufnr, })
|
||||
vim.keymap.set(
|
||||
"x",
|
||||
@@ -29,7 +31,8 @@ require("gitsigns").setup({
|
||||
":Gitsigns reset_hunk<CR>",
|
||||
{ buffer = bufnr, }
|
||||
)
|
||||
vim.keymap.set("n", "<leader>g?", gs.preview_hunk, { buffer = bufnr, })
|
||||
vim.keymap.set("n", "<leader>g?", gs.preview_hunk,
|
||||
{ buffer = bufnr, })
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>gb",
|
||||
@@ -42,3 +45,6 @@ require("gitsigns").setup({
|
||||
untracked = { text = "│", },
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
return setup
|
||||
|
||||
@@ -14,10 +14,14 @@
|
||||
limitations under the License.
|
||||
]]
|
||||
|
||||
local function setup()
|
||||
require("indent_blankline").setup {
|
||||
use_treesitter = true,
|
||||
show_first_indent_level = false,
|
||||
show_trailing_blankline_indent = false,
|
||||
show_current_context = true,
|
||||
max_indent_increase = 1
|
||||
max_indent_increase = 1,
|
||||
}
|
||||
end
|
||||
|
||||
return setup
|
||||
|
||||
@@ -17,3 +17,7 @@
|
||||
-- https://github.com/onsails/lspkind.nvim
|
||||
|
||||
-- configured and loaded in plugins.config.cmp
|
||||
local function setup()
|
||||
end
|
||||
|
||||
return setup
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
-- https://github.com/nvim-lualine/lualine.nvim
|
||||
|
||||
local function setup()
|
||||
require("lualine").setup({
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
@@ -45,3 +46,6 @@ require("lualine").setup({
|
||||
lualine_z = {},
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
return setup
|
||||
|
||||
@@ -16,4 +16,8 @@
|
||||
|
||||
-- https://github.com/L3MON4D3/LuaSnip
|
||||
|
||||
local function setup()
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
end
|
||||
|
||||
return setup
|
||||
|
||||
@@ -16,8 +16,12 @@
|
||||
|
||||
-- https://github.com/iamcco/markdown-preview.nvim
|
||||
|
||||
local function setup()
|
||||
vim.g.mkdp_filetypes = { "markdown", }
|
||||
vim.g.mkdp_port = "9080"
|
||||
vim.g.mkdp_echo_preview_url = 1
|
||||
vim.g.mkdp_open_ip = "192.168.2.22"
|
||||
vim.g.mkdp_open_to_the_world = 1
|
||||
end
|
||||
|
||||
return setup
|
||||
|
||||
@@ -16,4 +16,8 @@
|
||||
|
||||
-- https://github.com/williamboman/mason.nvim
|
||||
|
||||
local function setup()
|
||||
require("mason").setup()
|
||||
end
|
||||
|
||||
return setup
|
||||
|
||||
@@ -16,9 +16,13 @@
|
||||
|
||||
-- https://github.com/williamboman/mason-lspconfig.nvim
|
||||
|
||||
local function setup()
|
||||
require("mason-lspconfig").setup({
|
||||
-- A list of servers to automatically install if they're not already installed. Example: { "rust_analyzer@nightly", "lua_ls" }
|
||||
-- This setting has no relation with the `automatic_installation` setting.
|
||||
---@type string[]
|
||||
ensure_installed = require("lsp"):language_servers(),
|
||||
})
|
||||
end
|
||||
|
||||
return setup
|
||||
|
||||
@@ -16,4 +16,8 @@
|
||||
|
||||
-- https://github.com/RubixDev/mason-update-all
|
||||
|
||||
local function setup()
|
||||
require("mason-update-all").setup()
|
||||
end
|
||||
|
||||
return setup
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
-- https://github.com/fedepujol/move.nvim
|
||||
|
||||
local function setup()
|
||||
local opts = { noremap = true, silent = true, }
|
||||
vim.keymap.set("n", "<A-j>", function () vim.cmd.MoveLine(1) end, opts)
|
||||
vim.keymap.set("n", "<A-k>", function () vim.cmd.MoveLine(-1) end, opts)
|
||||
@@ -25,3 +26,6 @@ vim.keymap.set("x", "<A-j>", ":MoveBlock(1)<CR>", opts)
|
||||
vim.keymap.set("x", "<A-k>", ":MoveBlock(-1)<CR>", opts)
|
||||
vim.keymap.set("x", "<A-h>", ":MoveHBlock(-1)<CR>", opts)
|
||||
vim.keymap.set("x", "<A-l>", ":MoveHBlock(1)<CR>", opts)
|
||||
end
|
||||
|
||||
return setup
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
-- https://github.com/rcarriga/nvim-notify
|
||||
|
||||
local function setup()
|
||||
local has_telescope, telescope = pcall(require, "telescope")
|
||||
|
||||
local notify = require("notify")
|
||||
@@ -30,3 +31,6 @@ if has_telescope then
|
||||
telescope.load_extension("notify")
|
||||
vim.keymap.set("n", "<leader>fn", telescope.extensions.notify.notify)
|
||||
end
|
||||
end
|
||||
|
||||
return setup
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
-- https://github.com/nvim-orgmode/orgmode
|
||||
|
||||
local function setup()
|
||||
local orgmode = require("orgmode")
|
||||
orgmode.setup_ts_grammar()
|
||||
orgmode.setup({
|
||||
@@ -45,3 +46,6 @@ orgmode.setup({
|
||||
org_agenda_skip_deadline_if_done = true,
|
||||
|
||||
})
|
||||
end
|
||||
|
||||
return setup
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
-- https://github.com/nvim-telescope/telescope.nvim
|
||||
|
||||
local function setup()
|
||||
local builtin = require("telescope.builtin")
|
||||
|
||||
vim.keymap.set(
|
||||
@@ -45,3 +46,6 @@ vim.keymap.set(
|
||||
end
|
||||
)
|
||||
vim.keymap.set("n", "<leader>fb", builtin.buffers)
|
||||
end
|
||||
|
||||
return setup
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
-- https://github.com/folke/tokyonight.nvim
|
||||
|
||||
local function setup()
|
||||
local tokyonight = require("tokyonight")
|
||||
|
||||
tokyonight.setup({
|
||||
@@ -28,3 +29,6 @@ tokyonight.setup({
|
||||
})
|
||||
|
||||
tokyonight.load()
|
||||
end
|
||||
|
||||
return setup
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
-- https://github.com/nvim-tree/nvim-tree.lua
|
||||
|
||||
local function setup()
|
||||
require("nvim-tree").setup({
|
||||
sync_root_with_cwd = true,
|
||||
view = {
|
||||
@@ -65,3 +66,6 @@ require("nvim-tree").setup({
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>tt", require("nvim-tree.api").tree.toggle)
|
||||
end
|
||||
|
||||
return setup
|
||||
|
||||
@@ -16,7 +16,11 @@
|
||||
|
||||
-- https://github.com/nvim-treesitter/nvim-treesitter-context
|
||||
|
||||
local function setup()
|
||||
require("treesitter-context").setup({
|
||||
max_lines = 1,
|
||||
min_window_height = 10,
|
||||
})
|
||||
end
|
||||
|
||||
return setup
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
-- https://github.com/nvim-treesitter/nvim-treesitter
|
||||
|
||||
local function setup()
|
||||
require("nvim-treesitter.configs").setup({
|
||||
ensure_installed = {
|
||||
"c", -- recommended default
|
||||
@@ -49,3 +50,6 @@ require("nvim-treesitter.configs").setup({
|
||||
vim.opt.foldmethod = "expr"
|
||||
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||
vim.opt.foldenable = false
|
||||
end
|
||||
|
||||
return setup
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
-- https://github.com/Mofiqul/vscode.nvim
|
||||
|
||||
local function setup()
|
||||
local vscode = require("vscode")
|
||||
|
||||
vscode.setup({
|
||||
@@ -26,3 +27,6 @@ vscode.setup({
|
||||
})
|
||||
|
||||
vscode.load()
|
||||
end
|
||||
|
||||
return setup
|
||||
|
||||
@@ -16,8 +16,12 @@
|
||||
|
||||
-- https://github.com/simeji/winresizer
|
||||
|
||||
local function setup()
|
||||
vim.g.winresizer_vert_resize = "5"
|
||||
vim.g.winresizer_horiz_resize = "5"
|
||||
vim.g.winresizer_start_key = ""
|
||||
|
||||
vim.keymap.set("n", "<C-W>r", vim.cmd.WinResizerStartResize)
|
||||
end
|
||||
|
||||
return setup
|
||||
|
||||
@@ -16,8 +16,12 @@
|
||||
|
||||
-- https://github.com/sindrets/winshift.nvim
|
||||
|
||||
local function setup()
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<C-W>m",
|
||||
vim.cmd.WinShift
|
||||
)
|
||||
end
|
||||
|
||||
return setup
|
||||
|
||||
Reference in New Issue
Block a user