fix: plugin

This commit is contained in:
2024-02-28 22:01:26 +08:00
parent dc01c402c8
commit 685b477e1b
9 changed files with 43 additions and 1521 deletions
+18
View File
@@ -247,6 +247,24 @@ keymap.set('x', 'J', ':move \'>+1<CR>gv-gv', { noremap = true, silent = true })
keymap.set('', '<C-q>', ':call QuickFixToggle()<CR>', { noremap = true, silent = true }) keymap.set('', '<C-q>', ':call QuickFixToggle()<CR>', { noremap = true, silent = true })
-- vim.cmd("nnoremap gd <cmd>lua vim.lsp.buf.definition()<CR>")
-- vim.cmd("nnoremap <silent> gD <cmd>lua vim.lsp.buf.declaration()<CR>")
-- vim.cmd("nnoremap <silent> gr <cmd>lua vim.lsp.buf.references()<CR>")
-- vim.cmd("nnoremap <silent> gi <cmd>lua vim.lsp.buf.implementation()<CR>")
-- vim.cmd("nnoremap <silent> ca :Lspsaga code_action<CR>")
-- vim.cmd("nnoremap <silent> K :Lspsaga hover_doc<CR>")
-- -- vim.cmd('nnoremap <silent> <C-k> <cmd>lua vim.lsp.buf.signature_help()<CR>')
-- vim.cmd("nnoremap <silent> <C-m> :Lspsaga diagnostic_jump_prev<CR>")
keymap.set('','<C-m>',":Lspsaga diagnostic_jump_prev<CR>", opts)
keymap.set('','<C-n>',":Lspsaga diagnostic_jump_next<CR>", opts)
-- -- scroll down hover doc or scroll in definition preview
-- vim.cmd("nnoremap <silent> <C-f> <cmd>lua require('lspsaga.action').smart_scroll_with_saga(1)<CR>")
-- -- scroll up hover doc
-- vim.cmd("nnoremap <silent> <C-b> <cmd>lua require('lspsaga.action').smart_scroll_with_saga(-1)<CR>")
-- vim.cmd('command! -nargs=0 LspVirtualTextToggle lua require("lsp/virtual_text").toggle()')
-- -- Better nav for omnicomplete -- -- Better nav for omnicomplete
-- vim.cmd('inoremap <expr> <c-j> (\"\\<C-n>\")') -- vim.cmd('inoremap <expr> <c-j> (\"\\<C-n>\")')
-- vim.cmd('inoremap <expr> <c-k> (\"\\<C-p>\")') -- vim.cmd('inoremap <expr> <c-k> (\"\\<C-p>\")')
+1 -1
View File
@@ -29,7 +29,7 @@ require("lazy").setup({
-- version = "*", -- try installing the latest stable version for plugins that support semver -- version = "*", -- try installing the latest stable version for plugins that support semver
}, },
install = { colorscheme = { "tokyonight", "habamax" } }, install = { colorscheme = { "tokyonight", "habamax" } },
checker = { enabled = true }, -- automatically check for plugin updates checker = { enabled = false}, -- automatically check for plugin updates
performance = { performance = {
rtp = { rtp = {
-- disable some rtp plugins -- disable some rtp plugins
-14
View File
@@ -1,14 +0,0 @@
return {
{
"dinhhuy258/git.nvim",
event = "BufReadPre",
opts = {
keymaps = {
-- Open blame window
blame = "<Leader>gb",
-- Open file/folder in git repository
browse = "<Leader>go",
},
},
},
}
+23
View File
@@ -0,0 +1,23 @@
return {
{
"lewis6991/gitsigns.nvim",
opts = {
signs = {
-- TODO add hl to colorscheme
add = {hl = 'GitSignsAdd' , text = '▎', numhl='GitSignsAddNr' , linehl='GitSignsAddLn'},
change = {hl = 'GitSignsChange', text = '▎', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'},
delete = {hl = 'GitSignsDelete', text = '契', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'},
topdelete = {hl = 'GitSignsDelete', text = '契', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'},
changedelete = {hl = 'GitSignsChange', text = '▎', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'},
},
numhl = false,
linehl = false,
watch_gitdir = {
interval = 1000
},
sign_priority = 6,
update_debounce = 200,
status_formatter = nil, -- Use default
}
}
}
+1
View File
@@ -2,6 +2,7 @@ return {
-- lsp servers -- lsp servers
{ {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
event = { 'BufReadPre', 'BufReadPost', 'BufNewFile' },
opts = { opts = {
inlay_hints = { enabled = false }, inlay_hints = { enabled = false },
---@type lspconfig.options ---@type lspconfig.options
-207
View File
@@ -1,207 +0,0 @@
#!/bin/sh
set -o nounset # error when referencing undefined variable
set -o errexit # exit when command fails
installnodemac() {
brew install lua
brew install node
brew install yarn
}
installnodeubuntu() {
sudo apt install nodejs
sudo apt install npm
}
moveoldnvim() {
echo "Not installing LunarVim"
echo "Please move your ~/.config/nvim folder before installing"
exit
}
installnodearch() {
sudo pacman -S nodejs
sudo pacman -S npm
}
installnodefedora() {
sudo dnf install -y nodejs
sudo dnf install -y npm
}
installnodegentoo() {
echo "Printing current node status..."
emerge -pqv net-libs/nodejs
echo "Make sure the npm USE flag is enabled for net-libs/nodejs"
echo "If it isn't enabled, would you like to enable it with flaggie? (Y/N)"
read answer
[ "$answer" != "${answer#[Yy]}" ] && sudo flaggie net-libs/nodejs +npm
sudo emerge -avnN net-libs/nodejs
}
installnode() {
echo "Installing node..."
[ "$(uname)" == "Darwin" ] && installnodemac
[ -n "$(cat /etc/os-release | grep Ubuntu)" ] && installnodeubuntu
[ -f "/etc/arch-release" ] && installnodearch
[ -f "/etc/artix-release" ] && installnodearch
[ -f "/etc/fedora-release" ] && installnodefedora
[ -f "/etc/gentoo-release" ] && installnodegentoo
[ "$(expr substr $(uname -s) 1 10)" == "MINGW64_NT" ] && echo "Windows not currently supported"
sudo npm i -g neovim
}
installpiponmac() {
sudo curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py
rm get-pip.py
}
installpiponubuntu() {
sudo apt install python3-pip >/dev/null
}
installpiponarch() {
sudo pacman -S python-pip
}
installpiponfedora() {
sudo dnf install -y pip >/dev/nul
}
installpipongentoo() {
sudo emerge -avn dev-python/pip
}
installpip() {
echo "Installing pip..."
[ "$(uname)" == "Darwin" ] && installpiponmac
[ -n "$(cat /etc/os-release | grep Ubuntu)" ] && installpiponubuntu
[ -f "/etc/arch-release" ] && installpiponarch
[ -f "/etc/fedora-release" ] && installpiponfedora
[ -f "/etc/gentoo-release" ] && installpipongentoo
[ "$(expr substr $(uname -s) 1 10)" == "MINGW64_NT" ] && echo "Windows not currently supported"
}
installpynvim() {
echo "Installing pynvim..."
if [ -f "/etc/gentoo-release" ]; then
echo "Installing using Portage"
sudo emerge -avn dev-python/pynvim
else
pip3 install pynvim --user
fi
}
installpacker() {
git clone https://github.com/wbthomason/packer.nvim ~/.local/share/nvim/site/pack/packer/start/packer.nvim
}
cloneconfig() {
echo "Cloning LunarVim configuration"
git clone https://github.com/ChristianChiarulli/lunarvim.git ~/.config/nvim
# mv $HOME/.config/nvim/init.lua $HOME/.config/nvim/init.lua.tmp
# mv $HOME/.config/nvim/utils/init.lua $HOME/.config/nvim/init.lua
nvim -u $HOME/.config/nvim/init.lua +PackerInstall
# rm $HOME/.config/nvim/init.lua
# mv $HOME/.config/nvim/init.lua.tmp $HOME/.config/nvim/init.lua
}
asktoinstallnode() {
echo "node not found"
echo -n "Would you like to install node now (y/n)? "
read answer
[ "$answer" != "${answer#[Yy]}" ] && installnode
}
asktoinstallpip() {
# echo "pip not found"
# echo -n "Would you like to install pip now (y/n)? "
# read answer
# [ "$answer" != "${answer#[Yy]}" ] && installpip
echo "Please install pip3 before continuing with install"
exit
}
installonmac() {
brew install ripgrep fzf ranger
npm install -g tree-sitter-cli
}
pipinstallueberzug() {
which pip3 >/dev/null && pip3 install ueberzug || echo "Not installing ueberzug pip not found"
}
installonubuntu() {
sudo apt install ripgrep fzf ranger
sudo apt install libjpeg8-dev zlib1g-dev python-dev python3-dev libxtst-dev
pip3 install ueberzug
pip3 install neovim-remote
npm install -g tree-sitter-cli
}
installonarch() {
sudo pacman -S ripgrep fzf ranger
which yay >/dev/null && yay -S python-ueberzug-git || pipinstallueberzug
pip3 install neovim-remote
npm install -g tree-sitter-cli
}
installonfedora() {
sudo dnf groupinstall "X Software Development"
sudo dnf install -y fzf ripgrep ranger
pip3 install wheel ueberzug
}
installongentoo() {
sudo emerge -avn sys-apps/ripgrep app-shells/fzf app-misc/ranger dev-python/neovim-remote virtual/jpeg sys-libs/zlib
pipinstallueberzug
npm install -g tree-sitter-cli
}
installextrapackages() {
[ "$(uname)" == "Darwin" ] && installonmac
[ -n "$(cat /etc/os-release | grep Ubuntu)" ] && installonubuntu
[ -f "/etc/arch-release" ] && installonarch
[ -f "/etc/artix-release" ] && installonarch
[ -f "/etc/fedora-release" ] && installonfedora
[ -f "/etc/gentoo-release" ] && installongentoo
[ "$(expr substr $(uname -s) 1 10)" == "MINGW64_NT" ] && echo "Windows not currently supported"
}
# Welcome
echo 'Installing LunarVim'
# move old nvim directory if it exists
[ -d "$HOME/.config/nvim" ] && moveoldnvim
# install pip
which pip3 >/dev/null && echo "pip installed, moving on..." || asktoinstallpip
# install node and neovim support
which node >/dev/null && echo "node installed, moving on..." || asktoinstallnode
# install pynvim
pip3 list | grep pynvim >/dev/null && echo "pynvim installed, moving on..." || installpynvim
if [ -e "$HOME/.local/share/nvim/site/pack/packer/start/packer.nvim" ]; then
echo 'packer already installed'
else
installpacker
fi
if [ -e "$HOME/.config/nvim/init.lua" ]; then
echo 'nvcode already installed'
else
# clone config down
cloneconfig
# echo 'export PATH=$HOME/.config/nvim/utils/bin:$PATH' >>~/.zshrc
# echo 'export PATH=$HOME/.config/nvcode/utils/bin:$PATH' >>~/.bashrc
fi
echo "I recommend you also install and activate a font from here: https://github.com/ryanoasis/nerd-fonts"
# echo "I also recommend you add 'set preview_images_method ueberzug' to ~/.config/ranger/rc.conf"
# echo 'export PATH=/home/$USER/.config/nvcode/utils/bin:$PATH appending to zshrc/bashrc'
Binary file not shown.

Before

Width:  |  Height:  |  Size: 856 KiB

-171
View File
@@ -1,171 +0,0 @@
[
{
"key": "shift+ctrl+e",
"command": "actions.findWithSelection"
},
{
"key": "ctrl+e",
"command": "-actions.findWithSelection"
},
{
"key": "ctrl+e",
"command": "workbench.view.explorer"
},
{
"key": "shift+ctrl+e",
"command": "-workbench.view.explorer"
},
{
"key": "r",
"command": "renameFile",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
},
{
"key": "enter",
"command": "-renameFile",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
},
{
"key": "j",
"command": "list.focusDown",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
},
{
"key": "k",
"command": "list.focusUp",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
},
{
"key": "ctrl+j",
"command": "selectNextSuggestion",
"when": "editorTextFocus && suggestWidgetMultipleSuggestions && suggestWidgetVisible"
},
{
"key": "ctrl+k",
"command": "selectPrevSuggestion",
"when": "editorTextFocus && suggestWidgetMultipleSuggestions && suggestWidgetVisible"
},
{
"key": "ctrl+j",
"command": "workbench.action.quickOpenNavigateNext",
"when": "inQuickOpen"
},
{
"key": "tab",
"command": "selectNextSuggestion",
"when": "editorTextFocus && suggestWidgetMultipleSuggestions && suggestWidgetVisible"
},
{
"key": "tab",
"command": "workbench.action.quickOpenNavigateNext",
"when": "inQuickOpen"
},
{
"key": "shift+tab",
"command": "selectPrevSuggestion",
"when": "editorTextFocus && suggestWidgetMultipleSuggestions && suggestWidgetVisible"
},
{
"key": "shift+tab",
"command": "workbench.action.quickOpenNavigatePrevious",
"when": "inQuickOpen"
},
{
"key": "ctrl+k",
"command": "workbench.action.quickOpenNavigatePrevious",
"when": "inQuickOpen"
},
{
"key": "enter",
"command": "list.select",
"when": "explorerViewletVisible && filesExplorerFocus"
},
{
"key": "l",
"command": "list.select",
"when": "explorerViewletVisible && filesExplorerFocus && !inputFocus"
},
{
"key": "o",
"command": "list.toggleExpand",
"when": "explorerViewletVisible && filesExplorerFocus && !inputFocus"
},
{
"key": "h",
"command": "list.collapse",
"when": "explorerViewletVisible && filesExplorerFocus && !inputFocus"
},
{
"key": "a",
"command": "explorer.newFile",
"when": "filesExplorerFocus && !inputFocus"
},
{
"key": "shift+a",
"command": "explorer.newFolder",
"when": "filesExplorerFocus && !inputFocus"
},
{
"key": "shift+;",
"command": "insertPrevSuggestion",
"when": "hasOtherSuggestions && textInputFocus && textInputFocus && !inSnippetMode && !suggestWidgetVisible && config.editor.tabCompletion == 'on'"
},
{
"key": "ctrl+l",
"when": "sideBarFocus",
"command": "workbench.action.focusActiveEditorGroup"
},
{
"key": "ctrl+k",
"command": "workbench.action.focusActiveEditorGroup",
"when": "terminalFocus"
},
{
"key": "ctrl+shift+t",
"command": "workbench.action.terminal.focus",
"when": "!terminalFocus"
},
{
"key": "ctrl+j",
"command": "-editor.action.insertLineAfter",
"when": "editorTextFocus && neovim.ctrlKeysInsert && !neovim.recording && neovim.mode == 'insert'"
},
{
"key": "alt+j",
"command": "workbench.action.terminal.focus",
"when": "!terminalFocus"
},
{
"key": "ctrl+shift+t",
"command": "workbench.action.togglePanel"
},
{
"key": "ctrl+j",
"command": "-workbench.action.togglePanel"
},
{
"key": "shift+k",
"command": "editor.action.showHover",
"when": "editorTextFocus && neovim.mode != 'insert'"
},
{
"key": "ctrl+k ctrl+i",
"command": "-editor.action.showHover",
"when": "editorTextFocus"
},
{
"key": "shift+tab",
"command": "-acceptAlternativeSelectedSuggestion",
"when": "suggestWidgetVisible && textInputFocus && textInputFocus"
},
{
"key": "ctrl+f",
"command": "-vscode-neovim.ctrl-f",
"when": "editorTextFocus && neovim.ctrlKeysNormal && neovim.init && neovim.mode != 'insert'"
},
{
"key": "space",
"command": "whichkey.show",
"when": "neovim.mode != 'insert'"
}
]
File diff suppressed because it is too large Load Diff