2022-08-27 03:09:00 +00:00
|
|
|
-- vim: foldlevel=0
|
2022-08-31 16:15:32 +00:00
|
|
|
--
|
|
|
|
-- TODO: interesting plugins to install
|
|
|
|
-- - neovim minisurround to replace vim-surround
|
2022-09-09 18:52:07 +00:00
|
|
|
--
|
|
|
|
-- #### notes on Lua and requiring modules
|
|
|
|
-- https://github.com/wbthomason/packer.nvim/issues/955
|
|
|
|
-- - when you require(...) a file in lua, it gets cached, so future require calls don't hit the filesystem.
|
|
|
|
-- This means reloading your lua config won't apply any changes because the old files are cached.
|
|
|
|
-- - Cached required modules are stored in `package.loaded` table
|
|
|
|
-- - for example if `require("foo.bar")` was issued it's cache would be in
|
|
|
|
-- `package.loaded["foo.bar"]`
|
|
|
|
--
|
|
|
|
-- - to remove the cached module
|
|
|
|
--
|
|
|
|
-- lua << EOF
|
|
|
|
--
|
|
|
|
-- for k, v in pairs(package.loaded) do
|
|
|
|
-- if string.match(k, "^my_lua_config") then
|
|
|
|
-- package.loaded[k] = nil
|
|
|
|
-- end
|
|
|
|
-- end
|
|
|
|
--
|
|
|
|
-- EOF
|
|
|
|
--
|
|
|
|
-- #### Proper way to reload packer while picking up all changes from configs/setup
|
|
|
|
-- - Remove the cached module using package.loaded["foo.bar"] = nil
|
|
|
|
-- - Execute :PackerCompile
|
|
|
|
--
|
|
|
|
-- This doesn't seem to work:
|
|
|
|
-- - XXX ~~Reload all lua modules with `"pleanery.reload".reload_module(mod)`~~ XXX
|
2022-08-27 03:09:00 +00:00
|
|
|
|
2022-08-20 14:06:49 +00:00
|
|
|
return {
|
2022-08-22 13:50:16 +00:00
|
|
|
["nvim-treesitter/nvim-treesitter-textobjects"] = {
|
2022-09-01 01:19:20 +00:00
|
|
|
commit = "775c5dbcb6937954d5861465e7c3ec23b855af93",
|
2022-08-22 13:50:16 +00:00
|
|
|
after = "nvim-treesitter",
|
2022-08-22 14:20:21 +00:00
|
|
|
config = function()
|
|
|
|
require("custom.plugins.configs.treesitter-to")
|
|
|
|
end
|
2022-08-22 13:50:16 +00:00
|
|
|
},
|
2022-09-10 07:58:26 +00:00
|
|
|
["hrsh7th/cmp-buffer"] = {
|
|
|
|
config = function ()
|
|
|
|
local disabled_ft = {
|
|
|
|
"guihua",
|
|
|
|
"clap_input",
|
|
|
|
"guihua_rust,"
|
|
|
|
}
|
|
|
|
|
|
|
|
require("cmp").setup.buffer {
|
|
|
|
enabled = function ()
|
|
|
|
for _, v in ipairs(disabled_ft) do
|
|
|
|
if vim.o.ft == v then return false end
|
|
|
|
end
|
|
|
|
return true
|
|
|
|
end
|
|
|
|
}
|
|
|
|
end
|
|
|
|
},
|
2022-08-20 14:06:49 +00:00
|
|
|
["mfussenegger/nvim-dap"] = {
|
2022-09-09 18:52:07 +00:00
|
|
|
lock = true,
|
2022-08-20 14:06:49 +00:00
|
|
|
module = "dap"
|
|
|
|
},
|
2022-09-09 18:52:07 +00:00
|
|
|
["rcarriga/nvim-dap-ui"] = {
|
|
|
|
lock = true,
|
|
|
|
after = "nvim-dap",
|
|
|
|
config = function ()
|
|
|
|
require('dapui').setup()
|
|
|
|
end
|
|
|
|
},
|
|
|
|
["theHamsta/nvim-dap-virtual-text"] = {
|
|
|
|
lock = true,
|
|
|
|
after = "nvim-dap"
|
|
|
|
},
|
2022-08-26 14:28:12 +00:00
|
|
|
-- side panel with symbols (replaced by Navigator :LspSymbols cmd)
|
|
|
|
-- ["liuchengxu/vista.vim"] = {
|
|
|
|
-- cmd = "Vista",
|
|
|
|
-- setup = function()
|
|
|
|
-- require("core.utils").load_mappings "vista"
|
|
|
|
-- end
|
|
|
|
-- },
|
2022-08-27 03:09:00 +00:00
|
|
|
--
|
2022-08-20 14:06:49 +00:00
|
|
|
["folke/which-key.nvim"] = {
|
2022-09-09 18:52:07 +00:00
|
|
|
lock = true,
|
2022-08-20 14:06:49 +00:00
|
|
|
disable = false,
|
2022-09-10 07:58:26 +00:00
|
|
|
keys = {"<leader>", "<BS>", "<Space>"}
|
2022-08-20 14:06:49 +00:00
|
|
|
},
|
2022-08-22 01:28:23 +00:00
|
|
|
["nvim-telescope/telescope.nvim"] = {
|
2022-09-09 18:52:07 +00:00
|
|
|
lock = true,
|
2022-08-22 01:28:23 +00:00
|
|
|
disable = true
|
|
|
|
},
|
|
|
|
["ibhagwan/fzf-lua"] = {
|
2022-08-22 15:00:11 +00:00
|
|
|
lock = true,
|
2022-08-22 01:28:23 +00:00
|
|
|
after = "ui",
|
|
|
|
config = function()
|
|
|
|
require("custom.plugins.configs.fzflua")
|
|
|
|
require("plugins.configs.others").devicons()
|
|
|
|
end,
|
|
|
|
setup = function()
|
|
|
|
require("core.utils").load_mappings "fzf_lua"
|
|
|
|
end
|
|
|
|
},
|
2022-08-20 14:06:49 +00:00
|
|
|
-- Run async commands (make & errors)
|
|
|
|
["skywind3000/asyncrun.vim"] = {
|
2022-09-09 18:52:07 +00:00
|
|
|
lock = true,
|
2022-08-22 13:50:16 +00:00
|
|
|
cmd = "AsyncRun",
|
2022-08-20 14:06:49 +00:00
|
|
|
config = function()
|
|
|
|
require("core.utils").load_mappings "asyncrun"
|
|
|
|
vim.g.asyncrun_open = 8
|
|
|
|
end
|
|
|
|
},
|
2022-08-22 14:20:21 +00:00
|
|
|
["tpope/vim-fugitive"] = {
|
2022-09-09 18:52:07 +00:00
|
|
|
lock = true,
|
2022-08-29 15:17:35 +00:00
|
|
|
cmd = {"G", "Git", "G*"}
|
2022-08-22 14:20:21 +00:00
|
|
|
},
|
2022-08-22 15:00:11 +00:00
|
|
|
|
2022-08-27 03:09:00 +00:00
|
|
|
-- session and view
|
2022-08-22 01:28:23 +00:00
|
|
|
["vim-scripts/restore_view.vim"] = {},
|
2022-09-09 18:52:07 +00:00
|
|
|
|
2022-09-01 01:32:15 +00:00
|
|
|
-- ["rmagatti/auto-session"] = {
|
|
|
|
-- config = function ()
|
|
|
|
-- require("auto-session").setup {
|
|
|
|
-- log_level = "error",
|
|
|
|
-- auto_session_suppress_dirs = {"~/", "~/projects", "/"},
|
|
|
|
-- auto_save_enabled = false,
|
|
|
|
-- }
|
|
|
|
-- end
|
|
|
|
-- },
|
2022-08-27 03:09:00 +00:00
|
|
|
|
|
|
|
-- text formatting and navigation
|
2022-08-22 13:50:16 +00:00
|
|
|
-- repeat operator for plugin commands
|
|
|
|
["tpope/vim-repeat"] = {
|
|
|
|
keys = {"."},
|
|
|
|
},
|
2022-09-09 18:52:07 +00:00
|
|
|
|
2022-08-22 13:50:16 +00:00
|
|
|
["justinmk/vim-sneak"] = {
|
2022-09-09 18:52:07 +00:00
|
|
|
lock = true,
|
2022-08-22 13:50:16 +00:00
|
|
|
keys = {"s", "S"},
|
|
|
|
},
|
2022-08-27 03:09:00 +00:00
|
|
|
["tpope/vim-surround"] = {},
|
2022-08-27 03:44:09 +00:00
|
|
|
["godlygeek/tabular"] = {
|
|
|
|
cmd = "Tabularize"
|
|
|
|
},
|
2022-08-27 03:09:00 +00:00
|
|
|
--
|
|
|
|
-- misc general plugins
|
2022-08-22 01:28:23 +00:00
|
|
|
-- Read info files
|
2022-08-27 03:09:00 +00:00
|
|
|
--
|
2022-08-22 01:28:23 +00:00
|
|
|
["https://gitlab.com/HiPhish/info.vim.git"] = {
|
|
|
|
cmd = "Info",
|
|
|
|
},
|
2022-08-27 03:09:00 +00:00
|
|
|
|
|
|
|
-- snippets
|
2022-08-20 14:06:49 +00:00
|
|
|
["L3MON4D3/LuaSnip"] = {
|
2022-09-09 18:52:07 +00:00
|
|
|
lock = true,
|
2022-08-20 14:06:49 +00:00
|
|
|
config = function()
|
|
|
|
-- load default config first
|
|
|
|
require("plugins.configs.others").luasnip()
|
|
|
|
|
|
|
|
vim.g.my_snippets_paths = {"./custom_snippets"}
|
|
|
|
require("luasnip").filetype_extend("markdown", { "markdown_zk" })
|
|
|
|
|
|
|
|
-- load snippets from "honza/vim-snippets"
|
|
|
|
-- includes ultisnips and snipmate snippets
|
|
|
|
require("luasnip.loaders.from_snipmate").lazy_load({ override_priority = 800 })
|
|
|
|
require("luasnip.loaders.from_snipmate").lazy_load {
|
|
|
|
paths = vim.g.my_snippets_paths,
|
|
|
|
override_priority = 800
|
|
|
|
}
|
|
|
|
end
|
|
|
|
},
|
2022-09-01 01:32:15 +00:00
|
|
|
-- ------------------
|
2022-08-27 03:09:00 +00:00
|
|
|
-- LSP
|
2022-09-01 01:32:15 +00:00
|
|
|
-- ------------------
|
2022-08-20 19:49:33 +00:00
|
|
|
["honza/vim-snippets"] = {
|
|
|
|
module = {"cmp", "cmp_nvim_lsp"},
|
|
|
|
event = "InsertEnter",
|
2022-08-22 15:00:11 +00:00
|
|
|
},
|
2022-08-26 14:28:12 +00:00
|
|
|
["neovim/nvim-lspconfig"] = {
|
2022-09-09 18:52:07 +00:00
|
|
|
lock = true,
|
2022-08-29 14:46:20 +00:00
|
|
|
config = function()
|
|
|
|
local lspconfig = require("lspconfig")
|
|
|
|
lspconfig.util.default_config = vim.tbl_extend(
|
|
|
|
"force",
|
|
|
|
lspconfig.util.default_config,
|
|
|
|
{
|
|
|
|
autostart = false
|
|
|
|
}
|
|
|
|
)
|
|
|
|
end-- disable lspconfig, handled by navigator
|
2022-08-26 14:28:12 +00:00
|
|
|
},
|
|
|
|
["williamboman/mason-lspconfig.nvim"] = {
|
2022-09-09 18:52:07 +00:00
|
|
|
lock = true,
|
2022-08-26 14:28:12 +00:00
|
|
|
requires = {"williamboman/mason.nvim", "nvim-lspconfig"},
|
|
|
|
after = "mason.nvim",
|
|
|
|
module = "mson-lspconfig.nvim",
|
|
|
|
config = function()
|
|
|
|
require("mason-lspconfig").setup({})
|
|
|
|
end,
|
|
|
|
},
|
2022-09-01 01:32:15 +00:00
|
|
|
["ray-x/guihua.lua"] = {
|
2022-09-09 18:52:07 +00:00
|
|
|
lock = true,
|
|
|
|
module = {"navigator"},
|
2022-09-01 01:32:15 +00:00
|
|
|
run= "cd lua/fzy && make"
|
|
|
|
},
|
|
|
|
-- ["https://git.sp4ke.xyz/sp4ke/navigator.lua"] =
|
|
|
|
--
|
2022-08-27 03:09:00 +00:00
|
|
|
["ray-x/navigator.lua"] = {
|
2022-09-09 18:52:07 +00:00
|
|
|
lock = true,
|
|
|
|
opt = true,
|
2022-08-29 14:46:20 +00:00
|
|
|
after = { "nvim-lspconfig", "base46", "ui" },
|
2022-08-26 14:28:12 +00:00
|
|
|
requires = {"neovim/nvim-lspconfig", "ray-x/guihua.lua", "nvim-treesitter/nvim-treesitter"},
|
|
|
|
setup = function()
|
|
|
|
require("core.utils").load_mappings "navigator"
|
|
|
|
end,
|
|
|
|
config = function()
|
2022-08-29 14:46:20 +00:00
|
|
|
require("custom.plugins.configs.navigator").setup()
|
|
|
|
require("base46").load_highlight "lsp"
|
|
|
|
|
|
|
|
-- TODO: use nvchadui_lsp features manually
|
|
|
|
-- require("nvchad_ui.lsp")
|
2022-08-26 14:28:12 +00:00
|
|
|
end
|
|
|
|
},
|
2022-08-27 03:09:00 +00:00
|
|
|
|
2022-09-09 18:52:07 +00:00
|
|
|
["ray-x/lsp_signature.nvim"] = {
|
|
|
|
after = {"navigator.lua"},
|
|
|
|
config = function()
|
|
|
|
require("custom.plugins.configs.lsp_signature").setup()
|
|
|
|
end
|
|
|
|
|
|
|
|
},
|
|
|
|
|
2022-08-27 03:09:00 +00:00
|
|
|
-- per language plugins
|
|
|
|
|
2022-09-09 18:52:07 +00:00
|
|
|
-- -------
|
2022-08-27 03:09:00 +00:00
|
|
|
-- lua dev
|
2022-09-09 18:52:07 +00:00
|
|
|
-- -------
|
|
|
|
|
|
|
|
-- Eval Lua lines/selections
|
2022-08-27 03:09:00 +00:00
|
|
|
["bfredl/nvim-luadev"] = {
|
2022-09-09 18:52:07 +00:00
|
|
|
lock = true,
|
2022-08-27 03:09:00 +00:00
|
|
|
cmd = "Luadev",
|
|
|
|
keys = {
|
|
|
|
"<Plug>(Luadev-RunLine)",
|
|
|
|
"<Plug>(Luadev-Run)",
|
|
|
|
"<Plug>(Luadev-RunWord)",
|
|
|
|
"<Plug>(Luadev-Complete)",
|
|
|
|
},
|
|
|
|
setup = function()
|
|
|
|
local autocmd = vim.api.nvim_create_autocmd
|
|
|
|
autocmd("FileType", {
|
|
|
|
pattern = "lua",
|
|
|
|
callback = function ()
|
|
|
|
vim.keymap.set({'n', 'i'}, '<leader>r', '<Plug>(Luadev-RunLine)', {
|
|
|
|
desc = "Luadev RunLine"
|
|
|
|
})
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
end
|
|
|
|
},
|
2022-09-09 18:52:07 +00:00
|
|
|
|
|
|
|
-- REPL for Lua development
|
2022-09-01 01:32:15 +00:00
|
|
|
["ii14/neorepl.nvim"] = {
|
2022-09-09 18:52:07 +00:00
|
|
|
lock = true,
|
2022-09-01 01:32:15 +00:00
|
|
|
cmd = "Repl",
|
|
|
|
after = "nvim-cmp",
|
2022-09-09 18:52:07 +00:00
|
|
|
config = function ()
|
2022-09-01 01:32:15 +00:00
|
|
|
local autocmd = vim.api.nvim_create_autocmd
|
|
|
|
autocmd("FileType",{
|
|
|
|
pattern = "neorepl",
|
|
|
|
callback = function ()
|
|
|
|
require('cmp').setup.buffer({enabled = false})
|
2022-08-27 03:09:00 +00:00
|
|
|
|
2022-09-01 01:32:15 +00:00
|
|
|
-- custom keymap example
|
|
|
|
-- activate corresponding section in mappings
|
|
|
|
-- mappings = require("custom.utils").set_plugin_mappings "neorepl"
|
|
|
|
end
|
|
|
|
})
|
|
|
|
end
|
2022-09-09 18:52:07 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
-- Lua dev env
|
|
|
|
-- check setup in configs/navigator.lua
|
|
|
|
["folke/lua-dev.nvim"] = {
|
|
|
|
module = "lua-dev",
|
|
|
|
before = {"navigator.lua"},
|
|
|
|
},
|
|
|
|
|
|
|
|
-- golang dev
|
|
|
|
["ray-x/go.nvim"] = {
|
|
|
|
lock = true,
|
|
|
|
-- after = {"nvim-lspconfig", "navigator.lua", "guihua.lua"},
|
|
|
|
ft = {"go"},
|
|
|
|
opt = true,
|
|
|
|
config = function()
|
|
|
|
require("go").setup({
|
|
|
|
run_in_floaterm = true,
|
|
|
|
icons = false,
|
|
|
|
-- icons = { breakpoint = "🧘", currentpos = "🏃" }, -- set to false to disable
|
|
|
|
lsp_cfg = false, -- handled by navigator
|
|
|
|
-- lsp_keymaps = false, -- use navigator
|
|
|
|
-- lsp_diag_signs = false,
|
|
|
|
lsp_codelens = false, -- use navigator
|
|
|
|
textobjects = true,
|
|
|
|
})
|
|
|
|
end
|
2022-09-01 01:32:15 +00:00
|
|
|
}
|
2022-08-20 14:06:49 +00:00
|
|
|
}
|