Adds treesitter and biscuit plugins + tweak to sudo write

The two plugins were added along with relevant configuration for each

If in neovim and sudo_askpass isn't set, vim will display a warning if
WW is typed in command mode
This commit is contained in:
Jonathan Hodgson 2021-11-17 14:41:21 +00:00
parent 7cb88eb204
commit 8ea14abe9e
8 changed files with 36 additions and 0 deletions

6
.gitmodules vendored
View file

@ -73,3 +73,9 @@
[submodule "nvim/.config/nvim/pack/bundle/opt/lexima.vim"]
path = nvim/.config/nvim/pack/bundle/opt/lexima.vim
url = https://github.com/cohama/lexima.vim
[submodule "nvim/.config/nvim/pack/bundle/nvim-biscuits"]
path = nvim/.config/nvim/pack/bundle/opt/nvim-biscuits
url = https://github.com/code-biscuits/nvim-biscuits
[submodule "nvim/.config/nvim/pack/bundle/opt/nvim-treesitter"]
path = nvim/.config/nvim/pack/bundle/opt/nvim-treesitter
url = https://github.com/nvim-treesitter/nvim-treesitter

View file

@ -0,0 +1 @@
highlight BiscuitColor gui=italic

View file

@ -22,6 +22,8 @@ if has('packages')
packadd! deoplete-lsp
packadd! deoplete-notmuch
packadd! firenvim
packadd! nvim-treesitter
packadd! nvim-biscuits
lua <<EOF
if ( vim.lsp ~= nil ) then
vim.cmd "packadd! nvim-lspconfig"

@ -0,0 +1 @@
Subproject commit 15a0cb1273bd36d5a734210cdc3406fb4bcfb733

@ -0,0 +1 @@
Subproject commit a47df48e7d4232fd771f2537a4fb43f582c026c9

View file

@ -0,0 +1,12 @@
lua <<EOF
require('nvim-biscuits').setup({
default_config = {
min_distance = 3,
prefix_string = " "
},
show_on_start = true,
toggle_keybind = "<leader>cb"
})
EOF

View file

@ -85,6 +85,8 @@ nnoremap <leader>p :call mine#functions#proselint()<CR>
if has('nvim')
if !empty($SUDO_ASKPASS)
cnoremap WW w !sudo -A tee % > /dev/null
else
cnoremap WW echo "SUDO_ASKPASS variable needs to be set"<cr>
endif
else
cnoremap WW w !sudo tee % > /dev/null

View file

@ -0,0 +1,11 @@
lua <<EOF
require'nvim-treesitter.configs'.setup {
ensure_installed = "all",
highlight = {
enable = true
},
indent = {
enable = true
}
}
EOF