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
master
Jonathan Hodgson 3 years ago
parent 7cb88eb204
commit 8ea14abe9e
  1. 6
      .gitmodules
  2. 1
      nvim/.config/nvim/after/plugin/biscuit.vim
  3. 2
      nvim/.config/nvim/init.vim
  4. 1
      nvim/.config/nvim/pack/bundle/opt/nvim-biscuits
  5. 1
      nvim/.config/nvim/pack/bundle/opt/nvim-treesitter
  6. 12
      nvim/.config/nvim/plugin/biscuits.vim
  7. 2
      nvim/.config/nvim/plugin/mappings.vim
  8. 11
      nvim/.config/nvim/plugin/treesitter.vim

6
.gitmodules vendored

@ -73,3 +73,9 @@
[submodule "nvim/.config/nvim/pack/bundle/opt/lexima.vim"] [submodule "nvim/.config/nvim/pack/bundle/opt/lexima.vim"]
path = nvim/.config/nvim/pack/bundle/opt/lexima.vim path = nvim/.config/nvim/pack/bundle/opt/lexima.vim
url = https://github.com/cohama/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

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

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

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

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

@ -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

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

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