forked from ahurac/dotfiles
nvim : nouvelle configuration avec Paq
This commit is contained in:
parent
b41671910c
commit
7f2c5866fe
13 changed files with 39 additions and 35 deletions
|
@ -1,7 +1,7 @@
|
|||
-- Inclure la configuration par défaut de Vim
|
||||
-- Import my custom vim config
|
||||
vim.cmd [[ source ~/.vimrc ]]
|
||||
|
||||
-- Modules
|
||||
-- Import modules
|
||||
require('core')
|
||||
--require('plugins')
|
||||
--require('core')
|
||||
--require('lsp')
|
||||
|
|
|
@ -4,4 +4,3 @@ vim.g.maplocalleader = ','
|
|||
|
||||
-- Keymaps
|
||||
vim.keymap.set('n', '<leader>h', ':nohlsearch<CR>')
|
||||
|
||||
|
|
|
@ -17,4 +17,3 @@ vim.cmd([[
|
|||
set signcolumn=yes
|
||||
autocmd CursorHold * lua vim.diagnostic.open_float(nil, { focusable = false })
|
||||
]])
|
||||
|
||||
|
|
|
@ -1,6 +1,2 @@
|
|||
-- Activer les couleurs du terminal
|
||||
vim.o.termguicolors = true
|
||||
|
||||
-- Changer la palette de couleurs
|
||||
vim.cmd [[ colorscheme catppuccin ]]
|
||||
|
||||
|
|
|
@ -2,4 +2,3 @@ nvim_lsp = require'lspconfig'
|
|||
|
||||
require('lsp.bash')
|
||||
require('lsp.rust')
|
||||
require('lsp.typescript')
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
require'lspconfig'.tsserver.setup{}
|
2
config/nvim/lua/plugins/catppuccin.lua
Normal file
2
config/nvim/lua/plugins/catppuccin.lua
Normal file
|
@ -0,0 +1,2 @@
|
|||
-- Set the colorscheme
|
||||
vim.cmd [[ colorscheme catppuccin ]]
|
|
@ -1,3 +1,15 @@
|
|||
require("plugins.nvim_web_devicons")
|
||||
require("plugins.lualine")
|
||||
require("plugins.nvim_tree")
|
||||
-- Initialize plugin manager
|
||||
require "paq" {
|
||||
-- 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')
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
-- lualine configuration
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
|
@ -10,6 +11,8 @@ require('lualine').setup {
|
|||
path = 1,
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
-- Full width line
|
||||
vim.opt.laststatus = 3
|
||||
|
|
|
@ -4,4 +4,3 @@ vim.g.loaded_netrwPlugin = 1
|
|||
require("nvim-tree").setup()
|
||||
|
||||
vim.keymap.set('n', '<F2>', ':NvimTreeFindFileToggle<CR>')
|
||||
|
|
@ -1 +0,0 @@
|
|||
require('nvim-web-devicons')
|
13
config/nvim/paqadd.sh
Executable file
13
config/nvim/paqadd.sh
Executable 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
|
|
@ -1,18 +1,2 @@
|
|||
#!/bin/sh
|
||||
|
||||
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
|
||||
#!/bin/sh -x
|
||||
nvim +PaqSync
|
||||
|
|
Loading…
Reference in a new issue