nvim : nouvelle configuration avec Paq

This commit is contained in:
Ahurac 2024-01-06 16:19:26 +01:00
parent b41671910c
commit 7f2c5866fe
13 changed files with 39 additions and 35 deletions

View file

@ -1,7 +1,7 @@
-- Inclure la configuration par défaut de Vim -- Import my custom vim config
vim.cmd [[ source ~/.vimrc ]] vim.cmd [[ source ~/.vimrc ]]
-- Modules -- Import modules
require('core')
--require('plugins') --require('plugins')
--require('core')
--require('lsp') --require('lsp')

View file

@ -4,4 +4,3 @@ vim.g.maplocalleader = ','
-- Keymaps -- Keymaps
vim.keymap.set('n', '<leader>h', ':nohlsearch<CR>') vim.keymap.set('n', '<leader>h', ':nohlsearch<CR>')

View file

@ -17,4 +17,3 @@ vim.cmd([[
set signcolumn=yes set signcolumn=yes
autocmd CursorHold * lua vim.diagnostic.open_float(nil, { focusable = false }) autocmd CursorHold * lua vim.diagnostic.open_float(nil, { focusable = false })
]]) ]])

View file

@ -1,6 +1,2 @@
-- Activer les couleurs du terminal -- Activer les couleurs du terminal
vim.o.termguicolors = true vim.o.termguicolors = true
-- Changer la palette de couleurs
vim.cmd [[ colorscheme catppuccin ]]

View file

@ -2,4 +2,3 @@ nvim_lsp = require'lspconfig'
require('lsp.bash') require('lsp.bash')
require('lsp.rust') require('lsp.rust')
require('lsp.typescript')

View file

@ -1 +0,0 @@
require'lspconfig'.tsserver.setup{}

View file

@ -0,0 +1,2 @@
-- Set the colorscheme
vim.cmd [[ colorscheme catppuccin ]]

View file

@ -1,3 +1,15 @@
require("plugins.nvim_web_devicons") -- Initialize plugin manager
require("plugins.lualine") require "paq" {
require("plugins.nvim_tree") -- Let paq manage itself
'savq/paq-nvim',
-- User defined plugins
'catppuccin/nvim', -- colorscheme
'nvim-lualine/lualine.nvim', -- status line
'nvim-tree/nvim-tree.lua', -- file tree
}
-- Plugins configuration
require('plugins.catppuccin')
require('plugins.lualine')
require('plugins.nvim-tree')

View file

@ -1,3 +1,4 @@
-- lualine configuration
require('lualine').setup { require('lualine').setup {
options = { options = {
icons_enabled = true, icons_enabled = true,
@ -10,6 +11,8 @@ require('lualine').setup {
path = 1, path = 1,
} }
} }
} },
} }
-- Full width line
vim.opt.laststatus = 3

View file

@ -4,4 +4,3 @@ vim.g.loaded_netrwPlugin = 1
require("nvim-tree").setup() require("nvim-tree").setup()
vim.keymap.set('n', '<F2>', ':NvimTreeFindFileToggle<CR>') vim.keymap.set('n', '<F2>', ':NvimTreeFindFileToggle<CR>')

View file

@ -1 +0,0 @@
require('nvim-web-devicons')

13
config/nvim/paqadd.sh Executable file
View file

@ -0,0 +1,13 @@
#!/bin/sh -x
is_gitrepo() {(
cd "$1" || return
git status
) > /dev/null 2> /dev/null
}
clone_ifnalready() {
is_gitrepo "$1" || git clone --depth=1 https://github.com/savq/paq-nvim.git "$1"
}
clone_ifnalready ~/.local/share/nvim/site/pack/paqs/start/paq-nvim

View file

@ -1,18 +1,2 @@
#!/bin/sh #!/bin/sh -x
nvim +PaqSync
update_plugin() {
cd "$1" || return
printf 'Updating plugin \033[1m%s\033[0m...\n' "$(echo "$1" | sed 's|/start||')"
git pull
}
cd ~/.local/share/nvim/site/pack || exit
for i in */start/*; do
while [ "$(jobs -p | wc -l)" -ge 4 ]; do
sleep 1
done
update_plugin "$i" &
done
wait