Browse Source

Fixed the fuck out of #740!

main
Cian Butler 4 weeks ago
parent
commit
203d919251
Signed by: butlerx GPG Key ID: B37CA765BAA89170
34 changed files with 246 additions and 282 deletions
  1. +5
    -0
      config/nvim/after/indent/html.lua
  2. +0
    -4
      config/nvim/after/indent/html.vim
  3. +19
    -0
      config/nvim/after/indent/vim.lua
  4. +0
    -20
      config/nvim/after/indent/vim.vim
  5. +1
    -7
      config/nvim/compiler/bash.vim
  6. +1
    -7
      config/nvim/compiler/ksh.vim
  7. +1
    -7
      config/nvim/compiler/perlcritic.vim
  8. +1
    -7
      config/nvim/compiler/php.vim
  9. +1
    -7
      config/nvim/compiler/sh.vim
  10. +1
    -7
      config/nvim/compiler/shellcheck.vim
  11. +1
    -7
      config/nvim/compiler/vint.vim
  12. +1
    -7
      config/nvim/compiler/zsh.vim
  13. +0
    -178
      config/nvim/filetype.vim
  14. +5
    -0
      config/nvim/ftdetect/apache.vim
  15. +2
    -0
      config/nvim/ftdetect/assembly.vim
  16. +2
    -0
      config/nvim/ftdetect/awk.vim
  17. +13
    -0
      config/nvim/ftdetect/bind.vim
  18. +12
    -0
      config/nvim/ftdetect/c.vim
  19. +6
    -0
      config/nvim/ftdetect/cron.vim
  20. +17
    -0
      config/nvim/ftdetect/git.vim
  21. +11
    -0
      config/nvim/ftdetect/html.vim
  22. +9
    -0
      config/nvim/ftdetect/mail.vim
  23. +30
    -0
      config/nvim/ftdetect/perl.vim
  24. +4
    -0
      config/nvim/ftdetect/php.vim
  25. +7
    -0
      config/nvim/ftdetect/puppet.vim
  26. +41
    -0
      config/nvim/ftdetect/shell.vim
  27. +4
    -0
      config/nvim/ftdetect/sql.vim
  28. +9
    -0
      config/nvim/ftdetect/ssh.vim
  29. +13
    -0
      config/nvim/ftdetect/viml.vim
  30. +0
    -1
      config/nvim/ftplugin/javascript/config.vim
  31. +12
    -0
      config/nvim/indent/tsv.lua
  32. +0
    -11
      config/nvim/indent/tsv.vim
  33. +17
    -11
      config/nvim/plugin/lsp.lua
  34. +0
    -1
      config/nvim/plugin/shebang_create_exec.vim

+ 5
- 0
config/nvim/after/indent/html.lua View File

@@ -0,0 +1,5 @@
local setlocal = vim.bo

-- Don't re-indent lines on right-angle-bracket or enter
setlocal.indentkeys:remove { "<>>", "<Return>" }
vim.b.undo_ftplugin = vim.b.undo_ftplugin .. "|setlocal indentkeys<"

+ 0
- 4
config/nvim/after/indent/html.vim View File

@@ -1,4 +0,0 @@
" Don't re-indent lines on right-angle-bracket or enter
setlocal indentkeys-=<>>
setlocal indentkeys-=<Return>
let b:undo_ftplugin .= '|setlocal indentkeys<'

+ 19
- 0
config/nvim/after/indent/vim.lua View File

@@ -0,0 +1,19 @@
local setlocal = vim.bo
-- Observe VimL conventions for two-space indents
setlocal.shiftwidth = 2
setlocal.softtabstop = -1

-- Remove inapplicable defaults from 'indentkeys'
-- setlocal.indentkeys:remove { "0#", "0{", "0}", "0)", ":" }
vim.cmd [[
setlocal indentkeys-=0#
setlocal indentkeys-=0{
setlocal indentkeys-=0}
setlocal indentkeys-=0)
setlocal indentkeys-=:
]]

-- Comma nds to undo the above
if vim.b.undo_indent then
vim.b.undo_indent = vim.b.undo_indent .. "|setlocal shiftwidth<" .. "|setlocal softtabstop<"
end

+ 0
- 20
config/nvim/after/indent/vim.vim View File

@@ -1,20 +0,0 @@
" Observe VimL conventions for two-space indents
setlocal shiftwidth=2
if v:version > 703 || v:version == 703 && has('patch693')
setlocal softtabstop=-1
else
setlocal softtabstop=2
endif

" Remove inapplicable defaults from 'indentkeys'
setlocal indentkeys-=0#
setlocal indentkeys-=0{
setlocal indentkeys-=0}
setlocal indentkeys-=0)
setlocal indentkeys-=:

" Commands to undo the above
if exists('b:undo_indent')
let b:undo_indent = b:undo_indent . '|setlocal shiftwidth<'
let b:undo_indent = b:undo_indent . '|setlocal softtabstop<'
endif

+ 1
- 7
config/nvim/compiler/bash.vim View File

@@ -7,11 +7,5 @@ if exists(':CompilerSet') != 2
command -nargs=* CompilerSet setlocal <args>
endif

" 7.4.191 is the earliest version with the :S file name modifier, which we
" really should use if we can
if v:version >= 704 || v:version == 704 && has('patch191')
CompilerSet makeprg=bash\ -n\ --\ %:S
else
CompilerSet makeprg=bash\ -n\ --\ %
endif
CompilerSet makeprg=bash\ -n\ --\ %:S
CompilerSet errorformat=%f:\ line\ %l:\ %m

+ 1
- 7
config/nvim/compiler/ksh.vim View File

@@ -7,11 +7,5 @@ if exists(':CompilerSet') != 2
command -nargs=* CompilerSet setlocal <args>
endif

" 7.4.191 is the earliest version with the :S file name modifier, which we
" really should use if we can
if v:version >= 704 || v:version == 704 && has('patch191')
CompilerSet makeprg=ksh\ -n\ --\ %:S
else
CompilerSet makeprg=ksh\ -n\ --\ %
endif
CompilerSet makeprg=ksh\ -n\ --\ %:S
CompilerSet errorformat=%f:\ %l:\ %m

+ 1
- 7
config/nvim/compiler/perlcritic.vim View File

@@ -7,11 +7,5 @@ if exists(':CompilerSet') != 2
command -nargs=* CompilerSet setlocal <args>
endif

" 7.4.191 is the earliest version with the :S file name modifier, which we
" really should use if we can
if v:version >= 704 || v:version == 704 && has('patch191')
CompilerSet makeprg=perlcritic\ --verbose\ 1\ --\ %:S
else
CompilerSet makeprg=perlcritic\ --verbose\ 1\ --\ %
endif
CompilerSet makeprg=perlcritic\ --verbose\ 1\ --\ %:S
CompilerSet errorformat=%f:%l:%c:%m

+ 1
- 7
config/nvim/compiler/php.vim View File

@@ -7,13 +7,7 @@ if exists(':CompilerSet') != 2
command -nargs=* CompilerSet setlocal <args>
endif

" 7.4.191 is the earliest version with the :S file name modifier, which we
" really should use if we can
if v:version >= 704 || v:version == 704 && has('patch191')
CompilerSet makeprg=php\ -lq\ -f\ %:S
else
CompilerSet makeprg=php\ -lq\ -f\ %
endif
CompilerSet makeprg=php\ -lq\ -f\ %:S

" Here be copy-pasted dragons
CompilerSet errorformat=%E<b>%.%#Parse\ error</b>:\ %m\ in\ <b>%f</b>\ on\ line\ <b>%l</b><br\ />,


+ 1
- 7
config/nvim/compiler/sh.vim View File

@@ -7,11 +7,5 @@ if exists(':CompilerSet') != 2
command -nargs=* CompilerSet setlocal <args>
endif

" 7.4.191 is the earliest version with the :S file name modifier, which we
" really should use if we can
if v:version >= 704 || v:version == 704 && has('patch191')
CompilerSet makeprg=sh\ -n\ --\ %:S
else
CompilerSet makeprg=sh\ -n\ --\ %
endif
CompilerSet makeprg=sh\ -n\ --\ %:S
CompilerSet errorformat=%f:\ %l:\ %m

+ 1
- 7
config/nvim/compiler/shellcheck.vim View File

@@ -17,11 +17,5 @@ else
let s:set = s:set . '\ -s\ sh'
endif

" 7.4.191 is the earliest version with the :S file name modifier, which we
" really should use if we can
if v:version >= 704 || v:version == 704 && has('patch191')
execute s:set . '\ --\ %:S'
else
execute s:set . '\ --\ %'
endif
execute s:set . '\ --\ %:S'
CompilerSet errorformat=%f:%l:%c:\ %m\ [SC%n]

+ 1
- 7
config/nvim/compiler/vint.vim View File

@@ -7,11 +7,5 @@ if exists(':CompilerSet') != 2
command -nargs=* CompilerSet setlocal <args>
endif

" 7.4.191 is the earliest version with the :S file name modifier, which we
" really should use if we can
if v:version >= 704 || v:version == 704 && has('patch191')
CompilerSet makeprg=vint\ --\ %:S
else
CompilerSet makeprg=vint\ --\ %
endif
CompilerSet makeprg=vint\ --\ %:S
CompilerSet errorformat=%f:%l:%c:\ %m

+ 1
- 7
config/nvim/compiler/zsh.vim View File

@@ -7,11 +7,5 @@ if exists(':CompilerSet') != 2
command -nargs=* CompilerSet setlocal <args>
endif

" 7.4.191 is the earliest version with the :S file name modifier, which we
" really should use if we can
if v:version >= 704 || v:version == 704 && has('patch191')
CompilerSet makeprg=zsh\ -n\ --\ %:S
else
CompilerSet makeprg=zsh\ -n\ --\ %
endif
CompilerSet makeprg=zsh\ -n\ --\ %:S
CompilerSet errorformat=%f:%l:\ %m

+ 0
- 178
config/nvim/filetype.vim View File

@@ -64,43 +64,6 @@ augroup filetypedetect
\,?*.dpkg-{bak,dist,new,old}
\ call s:StripRepeat()

" Apache config
autocmd BufNewFile,BufRead
\ .htaccess
\,*/apache*/?*.conf
\ setfiletype apache
" Assembly language files
autocmd BufNewFile,BufRead
\ ?*.s
\ setfiletype asm
" AWK files
autocmd BufNewFile,BufRead
\ ?*.awk
\ setfiletype awk
" BIND zone file
autocmd BufNewFile,BufRead
\ */bind/db.?*
\,*/namedb/db.?*
\,named.root
\ setfiletype bindzone
" C files
autocmd BufNewFile,BufRead
\ ?*.c
\,?*.h
\ setfiletype c
" C++ files
autocmd BufNewFile,BufRead
\ ?*.cpp
\,?*.cxx
\,?*.c++
\,?*.hh
\ setfiletype cpp
" crontab(5) files
autocmd BufNewFile,BufRead
\ crontab
\,crontab.*
\,cron.d/*
\ setfiletype crontab
" CSS files
autocmd BufNewFile,BufRead
\ ?*.css
@@ -135,23 +98,6 @@ augroup filetypedetect
autocmd BufNewFile,BufRead
\ .gdbinit
\ setfiletype gdb
" Git commit messages
autocmd BufNewFile,BufRead
\ COMMIT_EDITMSG
\,MERGE_MSG
\,TAG_EDITMSG
\ setfiletype gitcommit
" Git config files
autocmd BufNewFile,BufRead
\ *.git/config
\,.gitconfig
\,.gitmodules
\,gitconfig
\ setfiletype gitconfig
" Git rebase manifests
autocmd BufNewFile,BufRead
\ git-rebase-todo
\ setfiletype gitrebase
" GnuPG configuration files
autocmd BufNewFile,BufRead
\ *gnupg/options
@@ -171,18 +117,6 @@ augroup filetypedetect
\ .gktrc*,
\,gktrc*
\ setfiletype gtkrc
" Vim help files
autocmd BufNewFile,BufRead
\ ~/.vim/doc/?*.txt
\,*/vim-*/doc/?*.txt
\,*/*.vim/doc/?*.txt
\,$VIMRUNTIME/doc/?*.txt
\ setfiletype help
" HTML files
autocmd BufNewFile,BufRead
\ ?*.html
\,?*.htm
\ setfiletype html
" inittab(5) files
autocmd BufNewFile,BufRead
\ inittab
@@ -209,15 +143,6 @@ augroup filetypedetect
autocmd BufNewFile,BufRead
\ ?*.m4
\ setfiletype m4
" Mail messages
autocmd BufNewFile,BufRead
\ ?*.msg
\,mutt-*-[0-9]\+-[0-9]\+-[0-9]\+
\ setfiletype mail
" Mail messages
autocmd BufNewFile,BufRead
\ aliases
\ setfiletype mailaliases
" Makefiles
autocmd BufNewFile,BufRead
\ Makefile
@@ -235,12 +160,6 @@ augroup filetypedetect
\,.muttrc
\,/etc/Muttrc.d/*
\ setfiletype muttrc
" BIND configuration file
autocmd BufNewFile,BufRead
\ named.conf
\,rndc.conf
\,rndc.key
\ setfiletype named
" Nano configuration file
autocmd BufNewFile,BufRead
\ *.nanorc
@@ -272,32 +191,6 @@ augroup filetypedetect
\,$TMPDIR/pass.?*/?*.txt
\,/tmp/pass.?*/?*.txt
\ setfiletype password
" Perl 5 files
autocmd BufNewFile,BufRead
\ ?*.pl
\,?*.pm
\,*/t/?*.t
\,*/xt/?*.t
\,Makefile.PL
\ setfiletype perl
" Perl 6 files
autocmd BufNewFile,BufRead
\ ?*.p6
\,?*.pl6
\,?*.pm6
\ setfiletype perl6
" PHP files
autocmd BufNewFile,BufRead
\ ?*.php
\ setfiletype php
" Perl 5 POD files
autocmd BufNewFile,BufRead
\ ?*.pod
\ setfiletype pod
" Perl 6 POD files
autocmd BufNewFile,BufRead
\ ?*.pod6
\ setfiletype pod6
" Python files
autocmd BufNewFile,BufRead
\ ?*.py
@@ -322,13 +215,6 @@ augroup filetypedetect
\ ?*.rb
\,Puppetfile
\ setfiletype ruby
" Puppet files
autocmd BufNewFile,BufRead
\ ?*.pp
\ setfiletype puppet
autocmd BufNewFile,BufRead
\ ?*.epp
\ setfiletype embeddedpuppet
" sed files
autocmd BufNewFile,BufRead
\ ?*.sed
@@ -337,61 +223,10 @@ augroup filetypedetect
autocmd BufNewFile,BufRead
\ /etc/services
\ setfiletype services
" Bash shell
autocmd BufNewFile,BufRead
\ ?*.bash
\,.bash_aliases
\,.bash_completion
\,.bash_logout
\,.bash_profile
\,.bashrc
\,bash-fc.?*
\,bash_aliases
\,bash_completion
\,bash_logout
\,bash_profile
\,bashrc
\ let b:is_bash = 1
\|setfiletype sh
" Korn shell
autocmd BufNewFile,BufRead
\ ?*.ksh
\,.kshrc
\,kshrc
\ let b:is_kornshell = 1
\|setfiletype sh
" POSIX/Bourne shell
autocmd BufNewFile,BufRead
\ ?*.sh
\,$ENV
\,.profile
\,.shinit
\,.shrc
\,.xinitrc
\,/etc/default/*
\,configure
\,profile
\,shinit
\,shrc
\,xinitrc
\ let b:is_posix = 1
\|setfiletype sh
" SQL
autocmd BufNewFile,BufRead
\ ?*.sql
\ setfiletype sql
" OpenSSH configuration
autocmd BufNewFile,BufRead
\ ssh_config,*/.ssh/config
\ setfiletype sshconfig
" sudoers(5)
autocmd BufNewFile,BufRead
\ sudoers
\,sudoers.tmp
\ setfiletype sshdconfig
" OpenSSH server configuration
autocmd BufNewFile,BufRead
\ sshd_config
\ setfiletype sudoers
" Subversion commit
autocmd BufNewFile,BufRead
@@ -423,28 +258,15 @@ augroup filetypedetect
autocmd BufNewFile,BufRead
\ ?*.tsv
\ setfiletype tsv
" .viminfo files
autocmd BufNewFile,BufRead
\ .viminfo
\ setfiletype viminfo
" .wgetrc files
autocmd BufNewFile,BufRead
\ .wgetrc
\,wgetrc
\ setfiletype wget
" XHTML files
autocmd BufNewFile,BufRead
\ ?*.xhtml
\,?*.xht
\ setfiletype xhtml
" XML files
autocmd BufNewFile,BufRead
\ ?*.xml
\ setfiletype xml
" Perl XS
autocmd BufNewFile,BufRead
\ ?*.xs
\ setfiletype xs
" Yacc files
autocmd BufNewFile,BufRead
\ ?*.y


+ 5
- 0
config/nvim/ftdetect/apache.vim View File

@@ -0,0 +1,5 @@
" Apache config
autocmd BufNewFile,BufRead
\ .htaccess
\,*/apache*/?*.conf
\ setfiletype apache

+ 2
- 0
config/nvim/ftdetect/assembly.vim View File

@@ -0,0 +1,2 @@
" Assembly language files
autocmd BufNewFile,BufRead ?*.s setfiletype asm

+ 2
- 0
config/nvim/ftdetect/awk.vim View File

@@ -0,0 +1,2 @@
" AWK files
autocmd BufNewFile,BufRead ?*.awk setfiletype awk

+ 13
- 0
config/nvim/ftdetect/bind.vim View File

@@ -0,0 +1,13 @@
" BIND zone file
autocmd BufNewFile,BufRead
\ */bind/db.?*
\,*/namedb/db.?*
\,named.root
\ setfiletype bindzone

" BIND configuration file
autocmd BufNewFile,BufRead
\ named.conf
\,rndc.conf
\,rndc.key
\ setfiletype named

+ 12
- 0
config/nvim/ftdetect/c.vim View File

@@ -0,0 +1,12 @@
" C files
autocmd BufNewFile,BufRead
\ ?*.c
\,?*.h
\ setfiletype c
" C++ files
autocmd BufNewFile,BufRead
\ ?*.cpp
\,?*.cxx
\,?*.c++
\,?*.hh
\ setfiletype cpp

+ 6
- 0
config/nvim/ftdetect/cron.vim View File

@@ -0,0 +1,6 @@
" crontab(5) files
autocmd BufNewFile,BufRead
\ crontab
\,crontab.*
\,cron.d/*
\ setfiletype crontab

+ 17
- 0
config/nvim/ftdetect/git.vim View File

@@ -0,0 +1,17 @@
" Git commit messages
autocmd BufNewFile,BufRead
\ COMMIT_EDITMSG
\,MERGE_MSG
\,TAG_EDITMSG
\ setfiletype gitcommit
" Git config files
autocmd BufNewFile,BufRead
\ *.git/config
\,.gitconfig
\,.gitmodules
\,gitconfig
\ setfiletype gitconfig
" Git rebase manifests
autocmd BufNewFile,BufRead
\ git-rebase-todo
\ setfiletype gitrebase

+ 11
- 0
config/nvim/ftdetect/html.vim View File

@@ -0,0 +1,11 @@
" HTML files
autocmd BufNewFile,BufRead
\ ?*.html
\,?*.htm
\ setfiletype html

" XHTML files
autocmd BufNewFile,BufRead
\ ?*.xhtml
\,?*.xht
\ setfiletype xhtml

+ 9
- 0
config/nvim/ftdetect/mail.vim View File

@@ -0,0 +1,9 @@
" Mail messages
autocmd BufNewFile,BufRead
\ ?*.msg
\,mutt-*-[0-9]\+-[0-9]\+-[0-9]\+
\ setfiletype mail
" Mail messages
autocmd BufNewFile,BufRead
\ aliases
\ setfiletype mailaliases

+ 30
- 0
config/nvim/ftdetect/perl.vim View File

@@ -0,0 +1,30 @@
" Perl 5 files
autocmd BufNewFile,BufRead
\ ?*.pl
\,?*.pm
\,*/t/?*.t
\,*/xt/?*.t
\,Makefile.PL
\ setfiletype perl

" Perl 6 files
autocmd BufNewFile,BufRead
\ ?*.p6
\,?*.pl6
\,?*.pm6
\ setfiletype perl6

" Perl 5 POD files
autocmd BufNewFile,BufRead
\ ?*.pod
\ setfiletype pod

" Perl 6 POD files
autocmd BufNewFile,BufRead
\ ?*.pod6
\ setfiletype pod6

" Perl XS
autocmd BufNewFile,BufRead
\ ?*.xs
\ setfiletype xs

+ 4
- 0
config/nvim/ftdetect/php.vim View File

@@ -0,0 +1,4 @@
" PHP files
autocmd BufNewFile,BufRead
\ ?*.php
\ setfiletype php

+ 7
- 0
config/nvim/ftdetect/puppet.vim View File

@@ -0,0 +1,7 @@
" Puppet files
autocmd BufNewFile,BufRead
\ ?*.pp
\ setfiletype puppet
autocmd BufNewFile,BufRead
\ ?*.epp
\ setfiletype embeddedpuppet

+ 41
- 0
config/nvim/ftdetect/shell.vim View File

@@ -0,0 +1,41 @@
" Bash shell
autocmd BufNewFile,BufRead
\ ?*.bash
\,.bash_aliases
\,.bash_completion
\,.bash_logout
\,.bash_profile
\,.bashrc
\,bash-fc.?*
\,bash_aliases
\,bash_completion
\,bash_logout
\,bash_profile
\,bashrc
\ let b:is_bash = 1
\|setfiletype sh

" Korn shell
autocmd BufNewFile,BufRead
\ ?*.ksh
\,.kshrc
\,kshrc
\ let b:is_kornshell = 1
\|setfiletype sh

" POSIX/Bourne shell
autocmd BufNewFile,BufRead
\ ?*.sh
\,$ENV
\,.profile
\,.shinit
\,.shrc
\,.xinitrc
\,/etc/default/*
\,configure
\,profile
\,shinit
\,shrc
\,xinitrc
\ let b:is_posix = 1
\|setfiletype sh

+ 4
- 0
config/nvim/ftdetect/sql.vim View File

@@ -0,0 +1,4 @@
" SQL
autocmd BufNewFile,BufRead
\ ?*.sql
\ setfiletype sql

+ 9
- 0
config/nvim/ftdetect/ssh.vim View File

@@ -0,0 +1,9 @@
" OpenSSH configuration
autocmd BufNewFile,BufRead
\ ssh_config,*/.ssh/config
\ setfiletype sshconfig

" OpenSSH server configuration
autocmd BufNewFile,BufRead
\ sshd_config
\ setfiletype sshdconfig

+ 13
- 0
config/nvim/ftdetect/viml.vim View File

@@ -11,3 +11,16 @@ autocmd BufNewFile,BufRead
\,gvimrc
\,vimrc
\ setfiletype vim
"
" Vim help files
autocmd BufNewFile,BufRead
\ ~/.vim/doc/?*.txt
\,*/vim-*/doc/?*.txt
\,*/*.vim/doc/?*.txt
\,$VIMRUNTIME/doc/?*.txt
\ setfiletype help

" .viminfo files
autocmd BufNewFile,BufRead
\ .viminfo
\ setfiletype viminfo

+ 0
- 1
config/nvim/ftplugin/javascript/config.vim View File

@@ -1,4 +1,3 @@
let g:javascript_plugin_jsdoc = 1
let g:javascript_plugin_flow = 1
set foldmethod=syntax


+ 12
- 0
config/nvim/indent/tsv.lua View File

@@ -0,0 +1,12 @@
local setlocal = vim.bo
-- Only do this when not done yet for this buffer
if vim.b.did_indent then
vim.fn.finish()
end
vim.b.did_indent = 1

-- Manual indenting and literal tabs for TSVs
setlocal.noautoindent = true
setlocal.noexpandtab = true
setlocal.softtabstop = 0
vim.b.undo_indent = "setlocal autoindent< expandtab< softtabstop<"

+ 0
- 11
config/nvim/indent/tsv.vim View File

@@ -1,11 +0,0 @@
" Only do this when not done yet for this buffer
if exists('b:did_indent')
finish
endif
let b:did_indent = 1

" Manual indenting and literal tabs for TSVs
setlocal noautoindent
setlocal noexpandtab
setlocal softtabstop=0
let b:undo_indent = 'setlocal autoindent< expandtab< softtabstop<'

+ 17
- 11
config/nvim/plugin/lsp.lua View File

@@ -31,12 +31,20 @@ local on_attach = function(client, bufnr)
map { "n", "<C-k>", "<cmd>lua vim.lsp.buf.signature_help()<CR>" }
map { "n", "<space>wa", "<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>" }
map { "n", "<space>wr", "<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>" }
map { "n", "<space>wl", "<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>" }
map {
"n",
"<space>wl",
"<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>",
}
map { "n", "<space>D", "<cmd>lua vim.lsp.buf.type_definition()<CR>" }
map { "n", "<space>rn", "<cmd>lua vim.lsp.buf.rename()<CR>" }
map { "n", "<space>ca", "<cmd>lua vim.lsp.buf.code_action()<CR>" }
map { "n", "gr", "<cmd>lua vim.lsp.buf.references()<CR>" }
map { "n", "<space>e", "<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>" }
map {
"n",
"<space>e",
"<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>",
}
map { "n", "[d", "<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>" }
map { "n", "]d", "<cmd>lua vim.lsp.diagnostic.goto_next()<CR>" }
map { "n", "<space>q", "<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>" }
@@ -52,12 +60,12 @@ local on_attach = function(client, bufnr)
if client.resolved_capabilities.document_highlight then
vim.api.nvim_exec(
[[
augroup lsp_document_highlight
autocmd! * <buffer>
autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()
autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()
augroup END
]],
augroup lsp_document_highlight
autocmd! * <buffer>
autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()
autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()
augroup END
]],
false
)
end
@@ -101,7 +109,5 @@ cmp.setup {
vim.fn["vsnip#anonymous"](args.body)
end,
},
mapping = {
["<C-y>"] = cmp.mapping.confirm { select = true },
},
mapping = { ["<C-y>"] = cmp.mapping.confirm { select = true } },
}

+ 0
- 1
config/nvim/plugin/shebang_create_exec.vim View File

@@ -19,4 +19,3 @@ augroup shebang_create_exec
autocmd BufWritePre *
\ call shebang_create_exec#Check(expand('<afile>:p'))
augroup END


Loading…
Cancel
Save