mirror of
https://github.com/dcarrillo/dotfiles.git
synced 2024-12-22 17:28:01 +00:00
[neovim] Reorganize lua packages
This commit is contained in:
parent
8948fc6620
commit
7ae6819126
@ -9,6 +9,7 @@
|
||||
#
|
||||
|
||||
PLUGINS_DIR="$HOME/.local/share/nvim/site/pack/packer/start"
|
||||
CONF_DIR="$HOME/.config/nvim/lua/core/"
|
||||
|
||||
function check_update() {
|
||||
local plugin=$1
|
||||
@ -24,7 +25,7 @@ function check_update() {
|
||||
echo -e "Plugin $plugin has a new version $last_commit (the current version is $current_commit)\n\tURL: $remote_url"
|
||||
|
||||
if [[ $update == "--update" ]]; then
|
||||
sed -i "s/$current_commit/$last_commit/" "$HOME/.config/nvim/lua/user/plugins.lua"
|
||||
sed -i "s/$current_commit/$last_commit/" "$CONF_DIR/plugins.lua"
|
||||
fi
|
||||
else
|
||||
echo "Plugin $plugin is up to date."
|
||||
@ -34,7 +35,7 @@ function check_update() {
|
||||
}
|
||||
|
||||
update=${1:-"false"}
|
||||
pushd "$HOME/.config/nvim/lua/user" > /dev/null || exit
|
||||
pushd "$CONF_DIR" > /dev/null || exit
|
||||
|
||||
grep -P "^\t*use.*commit" plugins.lua | cut -f 2,4 -d "\"" | while IFS= read -r line; do
|
||||
plugin=$(echo "$line" | cut -f1 -d "\"" | cut -f2 -d "/")
|
||||
|
@ -1,29 +1,2 @@
|
||||
require("user.options")
|
||||
require("user.keymaps")
|
||||
require("user.plugins")
|
||||
require("user.autocommands")
|
||||
require("user.commands")
|
||||
require("user.colorscheme")
|
||||
require("user.cmp")
|
||||
require("user.telescope")
|
||||
require("user.treesitter")
|
||||
require("user.autopairs")
|
||||
require("user.comment")
|
||||
require("user.gitsigns")
|
||||
require("user.neo-tree")
|
||||
require("user.bufferline")
|
||||
require("user.lualine")
|
||||
require("user.impatient")
|
||||
require("user.illuminate")
|
||||
require("user.indentline")
|
||||
require("user.lsp")
|
||||
require("user.dap")
|
||||
require("user.go")
|
||||
require("user.outline")
|
||||
require("user.wilder")
|
||||
require("user.trouble")
|
||||
require("user.autosave")
|
||||
require("user.markdowntoc")
|
||||
require("user.session-manager")
|
||||
require("user.diffview")
|
||||
require("user.sad")
|
||||
require("core")
|
||||
require("plugins")
|
||||
|
6
.config/nvim/lua/core/init.lua
Normal file
6
.config/nvim/lua/core/init.lua
Normal file
@ -0,0 +1,6 @@
|
||||
require("core.options")
|
||||
require("core.keymaps")
|
||||
require("core.plugins")
|
||||
require("core.autocommands")
|
||||
require("core.commands")
|
||||
require("core.colorscheme")
|
23
.config/nvim/lua/plugins/init.lua
Normal file
23
.config/nvim/lua/plugins/init.lua
Normal file
@ -0,0 +1,23 @@
|
||||
require("plugins.cmp")
|
||||
require("plugins.telescope")
|
||||
require("plugins.treesitter")
|
||||
require("plugins.autopairs")
|
||||
require("plugins.comment")
|
||||
require("plugins.gitsigns")
|
||||
require("plugins.neo-tree")
|
||||
require("plugins.bufferline")
|
||||
require("plugins.lualine")
|
||||
require("plugins.impatient")
|
||||
require("plugins.illuminate")
|
||||
require("plugins.indentline")
|
||||
require("plugins.lsp")
|
||||
require("plugins.dap")
|
||||
require("plugins.go")
|
||||
require("plugins.outline")
|
||||
require("plugins.wilder")
|
||||
require("plugins.trouble")
|
||||
require("plugins.autosave")
|
||||
require("plugins.markdowntoc")
|
||||
require("plugins.session-manager")
|
||||
require("plugins.diffview")
|
||||
require("plugins.sad")
|
@ -3,8 +3,8 @@ if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
require("user.lsp.mason")
|
||||
require("user.lsp.handlers").setup()
|
||||
require("user.lsp.null-ls")
|
||||
require("plugins.lsp.mason")
|
||||
require("plugins.lsp.handlers").setup()
|
||||
require("plugins.lsp.null-ls")
|
||||
|
||||
win.default_options.border = "rounded"
|
@ -36,13 +36,13 @@ local opts = {}
|
||||
|
||||
for _, server in pairs(servers) do
|
||||
opts = {
|
||||
on_attach = require("user.lsp.handlers").on_attach,
|
||||
capabilities = require("user.lsp.handlers").capabilities,
|
||||
on_attach = require("plugins.lsp.handlers").on_attach,
|
||||
capabilities = require("plugins.lsp.handlers").capabilities,
|
||||
}
|
||||
|
||||
server = vim.split(server, "@")[1]
|
||||
|
||||
local require_ok, conf_opts = pcall(require, "user.lsp.settings." .. server)
|
||||
local require_ok, conf_opts = pcall(require, "plugins.lsp.settings." .. server)
|
||||
if require_ok then
|
||||
opts = vim.tbl_deep_extend("force", conf_opts, opts)
|
||||
end
|
Loading…
Reference in New Issue
Block a user