From 9021c22ea5913579aed0920660eed5212bd1053d Mon Sep 17 00:00:00 2001 From: "flyingscorpio@clevo" Date: Sat, 6 Aug 2022 10:52:57 +0200 Subject: [PATCH] Split plugin options into multiple files --- .../files/lua/plugins/options/indentline.lua | 6 ++++++ .../neovim/files/lua/plugins/options/init.lua | 7 +++++++ .../neovim/files/lua/plugins/options/lsp.lua | 6 ++++++ .../files/lua/plugins/options/nerdtree.lua | 5 +++++ .../{options.lua => options/treesitter.lua} | 20 ------------------- .../files/lua/plugins/options/vimtex.lua | 7 +++++++ 6 files changed, 31 insertions(+), 20 deletions(-) create mode 100644 roles/neovim/files/lua/plugins/options/indentline.lua create mode 100644 roles/neovim/files/lua/plugins/options/init.lua create mode 100644 roles/neovim/files/lua/plugins/options/lsp.lua create mode 100644 roles/neovim/files/lua/plugins/options/nerdtree.lua rename roles/neovim/files/lua/plugins/{options.lua => options/treesitter.lua} (69%) create mode 100644 roles/neovim/files/lua/plugins/options/vimtex.lua diff --git a/roles/neovim/files/lua/plugins/options/indentline.lua b/roles/neovim/files/lua/plugins/options/indentline.lua new file mode 100644 index 0000000..ad14651 --- /dev/null +++ b/roles/neovim/files/lua/plugins/options/indentline.lua @@ -0,0 +1,6 @@ +-- PLUGINS - OPTIONS + +-- indentLine +-- vim.g.indentLine_char = '▏' +vim.g.indentLine_fileType = { 'html', 'htmldjango', 'tex' } +vim.g.indentLine_setConceal = 0 diff --git a/roles/neovim/files/lua/plugins/options/init.lua b/roles/neovim/files/lua/plugins/options/init.lua new file mode 100644 index 0000000..250bac2 --- /dev/null +++ b/roles/neovim/files/lua/plugins/options/init.lua @@ -0,0 +1,7 @@ +-- PLUGINS - OPTIONS + +require('plugins.options.lsp') +require('plugins.options.treesitter') +require('plugins.options.nerdtree') +require('plugins.options.vimtex') +require('plugins.options.indentline') diff --git a/roles/neovim/files/lua/plugins/options/lsp.lua b/roles/neovim/files/lua/plugins/options/lsp.lua new file mode 100644 index 0000000..3f2e72c --- /dev/null +++ b/roles/neovim/files/lua/plugins/options/lsp.lua @@ -0,0 +1,6 @@ +-- LSP - OPTIONS + +-- LSP Servers +require('lsp.bash') +require('lsp.latex') +require('lsp.lua') diff --git a/roles/neovim/files/lua/plugins/options/nerdtree.lua b/roles/neovim/files/lua/plugins/options/nerdtree.lua new file mode 100644 index 0000000..11e10f1 --- /dev/null +++ b/roles/neovim/files/lua/plugins/options/nerdtree.lua @@ -0,0 +1,5 @@ +-- PLUGINS - OPTIONS + +-- NERDTree +vim.g.NERDTreeIgnore = { '^__pycache__$', '\\.pyc', '\\~$' } +vim.keymap.set('n', 'ne', 'NERDTree', { remap = true }) diff --git a/roles/neovim/files/lua/plugins/options.lua b/roles/neovim/files/lua/plugins/options/treesitter.lua similarity index 69% rename from roles/neovim/files/lua/plugins/options.lua rename to roles/neovim/files/lua/plugins/options/treesitter.lua index 7cb70cd..1abe327 100644 --- a/roles/neovim/files/lua/plugins/options.lua +++ b/roles/neovim/files/lua/plugins/options/treesitter.lua @@ -1,10 +1,5 @@ -- PLUGINS - OPTIONS --- LSP Servers -require('lsp.bash') -require('lsp.latex') -require('lsp.lua') - -- Treesitter require'nvim-treesitter.configs'.setup { -- A list of parser names, or "all" @@ -39,18 +34,3 @@ require'nvim-treesitter.configs'.setup { } vim.opt.foldmethod = 'expr' vim.opt.foldexpr = 'nvim_treesitter#foldexpr()' - --- NERDTree -vim.g.NERDTreeIgnore = { '^__pycache__$', '\\.pyc', '\\~$' } -vim.keymap.set('n', 'ne', 'NERDTree', { remap = true }) - --- VimTex -vim.g.tex_flavor = 'latex' -vim.g.vimtex_view_method = 'zathura' -vim.g.vimtex_quickfix_autoclose_after_keystrokes = 2 -vim.g.vimtex_quickfix_open_on_warning = 0 - --- indentLine --- vim.g.indentLine_char = '▏' -vim.g.indentLine_fileType = { 'html', 'htmldjango', 'tex' } -vim.g.indentLine_setConceal = 0 diff --git a/roles/neovim/files/lua/plugins/options/vimtex.lua b/roles/neovim/files/lua/plugins/options/vimtex.lua new file mode 100644 index 0000000..906ccf6 --- /dev/null +++ b/roles/neovim/files/lua/plugins/options/vimtex.lua @@ -0,0 +1,7 @@ +-- PLUGINS - OPTIONS + +-- VimTex +vim.g.tex_flavor = 'latex' +vim.g.vimtex_view_method = 'zathura' +vim.g.vimtex_quickfix_autoclose_after_keystrokes = 2 +vim.g.vimtex_quickfix_open_on_warning = 0