refactor pluginoptions to lua

This commit is contained in:
saibotk 2022-04-17 21:31:47 +02:00
parent 782eb2a952
commit 7cca269038
Signed by: saibotk
GPG key ID: 67585F0065E261D5
3 changed files with 71 additions and 76 deletions

View file

@ -1,14 +1,10 @@
local nvim_config_root = '~/.config/nvim'
-- BASIC OPTIONS -- BASIC OPTIONS
require('plugins') require('plugins')
require('options') require('options')
require('mappings') require('mappings')
require('pluginoptions')
-- VIM PLUGIN OPTIONS -- PLUGIN OPTIONS
vim.cmd('source ' .. nvim_config_root .. '/pluginoptions.vim')
-- LUA PLUGIN OPTIONS
require('telescopeconfig') require('telescopeconfig')
require('autocompletion') require('autocompletion')
require('treesitterconfig') require('treesitterconfig')

View file

@ -0,0 +1,69 @@
-- PLUGIN OPTIONS
-- GITGUTTER SETUP
-- =========================
vim.api.nvim_set_var('gitgutter_sign_added', '')
vim.api.nvim_set_var('gitgutter_sign_modified', '')
vim.api.nvim_set_var('gitgutter_sign_removed', '')
vim.api.nvim_set_var('gitgutter_sign_modified_removed', '')
vim.cmd [[
augroup VimDiff
autocmd!
autocmd VimEnter,FilterWritePre * if &diff | GitGutterDisable | endif
augroup END
]]
-- VIMWIKI SETUP
-- =========================
vim.api.nvim_set_var('vimwiki_list', {{path = '~/.notes/', syntax = 'markdown', ext = '.md'}})
vim.api.nvim_set_var('vimwiki_hl_headers', 1)
vim.api.nvim_set_var('vimwiki_listsyms', ' X')
-- VIMTEX SETUP
-- =========================
vim.api.nvim_set_var('vimtex_compiler_engine', 'lualatex')
vim.api.nvim_set_var('vimtex_quickfix_mode', 0)
vim.api.nvim_set_var('tex_flavor', 'latex')
vim.api.nvim_set_var('vimtex_compiler_method', 'latexmk')
vim.api.nvim_set_var('vimtex_compiler_latexmk', {
backend = 'nvim',
background = 1,
build_dir = '',
callback = 1,
continuous = 1,
executable = 'latexmk',
hooks = {},
options = {'-pdflatex=lualatex', '-file-line-error', '-synctex=1', '-interaction=nonstopmode'}
})
-- TMUX SETUP
-- =========================
vim.api.nvim_set_var('tmuxcomplete#trigger', '')
-- GOYO
-- =========================
vim.cmd [[
function! s:goyo_enter()
set noshowcmd
set scrolloff=999
endfunction
function! s:goyo_leave()
set showcmd
set scrolloff=1
endfunction
autocmd! User GoyoEnter nested call <SID>goyo_enter()
autocmd! User GoyoLeave nested call <SID>goyo_leave()
]]
vim.api.nvim_set_var('goyo_width', 120)
-- COLORS.LUA SETUP
-- =========================
require('colorizer').setup()

View file

@ -1,70 +0,0 @@
" PLUGIN OPTIONS
" GITGUTTER SETUP
" =========================
let g:gitgutter_sign_added = '∙'
let g:gitgutter_sign_modified = '∙'
let g:gitgutter_sign_removed = '∙'
let g:gitgutter_sign_modified_removed = '∙'
augroup VimDiff
autocmd!
autocmd VimEnter,FilterWritePre * if &diff | GitGutterDisable | endif
augroup END
" VIMWIKI SETUP
" =========================
let g:vimwiki_list = [{'path': '~/.notes/',
\ 'syntax': 'markdown', 'ext': '.md'}]
let g:vimwiki_hl_headers = 1
let g:vimwiki_listsyms = ' X'
" VIMTEX SETUP
" =========================
let g:vimtex_compiler_engine = 'lualatex'
let g:vimtex_quickfix_mode = 0
let g:tex_flavor = 'latex'
let g:vimtex_compiler_method = 'latexmk'
let g:vimtex_compiler_latexmk = {
\ 'backend' : 'nvim',
\ 'background' : 1,
\ 'build_dir' : '',
\ 'callback' : 1,
\ 'continuous' : 1,
\ 'executable' : 'latexmk',
\ 'hooks' : [],
\ 'options' : [
\ '-pdflatex=lualatex',
\ '-file-line-error',
\ '-synctex=1',
\ '-interaction=nonstopmode',
\ ],
\}
" COLORS.LUA SETUP
" =========================
lua require'colorizer'.setup()
" TMUX SETUP
" =========================
let g:tmuxcomplete#trigger = ''
" GOYO
" =========================
function! s:goyo_enter()
set noshowcmd
set scrolloff=999
endfunction
function! s:goyo_leave()
set showcmd
set scrolloff=1
endfunction
autocmd! User GoyoEnter nested call <SID>goyo_enter()
autocmd! User GoyoLeave nested call <SID>goyo_leave()
let g:goyo_width = 120