Convert to lua

- prune unused
- drop scripting, use symlink for identical options
This commit is contained in:
Thomas Gideon 2023-05-09 11:31:20 -04:00
parent dc820cae1c
commit 9fee066f65
13 changed files with 50 additions and 56 deletions

View file

@ -1,16 +0,0 @@
let g:JavaImpDataDir = $HOME . "/.vim/JavaImp"
" F7 to call clean redundant Java imports and sort them
function JavaImpClean()
%!~/bin/clean_imports.sh %
:JavaImpSort
endfunction
:command JavaImpClean exec JavaImpClean()
:nnoremap <F7> :JavaImpClean<CR>
"let makeprg = 'java -cp /opt/boxen/homebrew/opt/checkstyle/libexec/checkstyle-6.0-all.jar -c '. vimrc_git . '/checkstyle.xml %:p'
let makeprg = 'checkstyle -c '. vimrc_git . '/checkstyle.xml ./%'
let &makeprg=escape(makeprg, ' ')
setlocal errorformat=%f:%l:\ %m,%f:%l:%v:\ %m,%-G%.%#

5
ftplugin/javascript.lua Normal file
View file

@ -0,0 +1,5 @@
vim.cmd('setlocal fdm=indent')
vim.cmd('setlocal smartindent')
vim.cmd('setlocal list')
-- set an alternate colorscheme from coding
vim.cmd('colorscheme breezy')

View file

@ -1,5 +0,0 @@
setlocal fdm=indent
setlocal smartindent
setlocal list
" set an alternate colorscheme from coding
colorscheme breezy

18
ftplugin/markdown.lua Normal file
View file

@ -0,0 +1,18 @@
-- set a smaller indent
local indent = 2
vim.opt.tabstop = indent
vim.opt.shiftwidth = indent
vim.opt.softtabstop = indent
-- don't hard break text
vim.opt.textwidth = 0
-- keep soft breaks between words
vim.cmd('setlocal linebreak')
-- turn list off as it interferes with soft wrapping
vim.cmd('setlocal nolist')
-- turn off breaking when typing new text
vim.cmd('setlocal formatoptions-=t')
-- turn off line width hint
vim.cmd('setlocal colorcolumn=0')
-- set an alternate colorscheme from coding
vim.cmd('colorscheme quiet')

View file

@ -1,9 +0,0 @@
" set a smaller indent
setlocal ts=2
setlocal sw=2
" and set up the buffer just like a text file
let oldwd = getcwd()
exec "cd ~/.config/nvim/ftplugin"
source text.vim
exec "cd " . oldwd

1
ftplugin/rust.lua Normal file
View file

@ -0,0 +1 @@
vim.g.rustfmt_autosave = 1

View file

@ -1 +0,0 @@
let g:rustfmt_autosave = 1

View file

@ -1 +0,0 @@
au BufWrite * :Autoformat

12
ftplugin/text.lua Normal file
View file

@ -0,0 +1,12 @@
-- don't hard break text
vim.opt.textwidth = 0
-- keep soft breaks between words
vim.cmd('setlocal linebreak')
-- turn list off as it interferes with soft wrapping
vim.cmd('setlocal nolist')
-- turn off breaking when typing new text
vim.cmd('setlocal formatoptions-=t')
-- turn off line width hint
vim.cmd('setlocal colorcolumn=0')
-- set an alternate colorscheme from coding
vim.cmd('colorscheme quiet')

View file

@ -1,12 +0,0 @@
" don't hard break text
setlocal tw=0
" keep soft breaks between words
setlocal linebreak
" turn list off as it interferes with soft wrapping
setlocal nolist
" turn off breaking when typing new text
setlocal formatoptions-=t
" turn off line width hint
setlocal colorcolumn=0
" set an alternate colorscheme from coding
colorscheme quiet

13
ftplugin/typescript.lua Normal file
View file

@ -0,0 +1,13 @@
vim.g.neoformat_try_node_exe = 1
-- set a smaller indent
local indent = 2
vim.opt.tabstop = indent
vim.opt.shiftwidth = indent
vim.opt.softtabstop = indent
vim.cmd('setlocal fdm=indent')
vim.cmd('setlocal smartindent')
vim.cmd('setlocal list')
-- set an alternate colorscheme from coding
vim.cmd('colorscheme breezy')

View file

@ -1,7 +0,0 @@
let g:neoformat_try_node_exe = 1
setlocal sw=2 ts=2
setlocal fdm=indent
setlocal smartindent
setlocal list
" set an alternate colorscheme from coding
colorscheme breezy

View file

@ -1,5 +0,0 @@
" and set up the buffer just like a markdown file
let oldwd = getcwd()
exec "cd ~/.config/nvim/ftplugin"
source markdown.vim
exec "cd " . oldwd

1
ftplugin/vimwiki.vim Symbolic link
View file

@ -0,0 +1 @@
markdown.vim