From 255b14a37176e2072810bc03d160e7ebd6a49d41 Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 2 Jul 2021 14:39:36 -0400 Subject: remove lv config so that user settings actually mean something --- .gitignore | 1 + lua/lv-compe/init.lua | 28 +-------- lv-config.lua | 110 ---------------------------------- utils/installer/install.sh | 2 +- utils/installer/lv-config.example.lua | 110 ++++++++++++++++++++++++++++++++++ 5 files changed, 114 insertions(+), 137 deletions(-) delete mode 100644 lv-config.lua create mode 100644 utils/installer/lv-config.example.lua diff --git a/.gitignore b/.gitignore index 8b4f7a74..c441ffa0 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ session wiki/ pack/ utils/java/* +lv-config.lua lua-language-server/ eclipse.jdt.ls/ .language-servers/ diff --git a/lua/lv-compe/init.lua b/lua/lv-compe/init.lua index 54ef2310..d0f7efb1 100644 --- a/lua/lv-compe/init.lua +++ b/lua/lv-compe/init.lua @@ -34,32 +34,6 @@ require'compe'.setup { } } ---  ---  ---  ---  ---  ---  ---  ---  ---  ---  ---  ---  ---  ---  ---  ---  --- ﬘ ---  ---  ---  --- m ---  ---  ---  ---  - local t = function(str) return vim.api.nvim_replace_termcodes(str, true, true, true) end @@ -87,6 +61,7 @@ _G.tab_complete = function() return vim.fn['compe#complete']() end end + _G.s_tab_complete = function() if vim.fn.pumvisible() == 1 then return t "" @@ -97,6 +72,7 @@ _G.s_tab_complete = function() end end + vim.api.nvim_set_keymap("i", "", "v:lua.tab_complete()", {expr = true}) vim.api.nvim_set_keymap("s", "", "v:lua.tab_complete()", {expr = true}) vim.api.nvim_set_keymap("i", "", "v:lua.s_tab_complete()", {expr = true}) diff --git a/lv-config.lua b/lv-config.lua deleted file mode 100644 index f990f2a0..00000000 --- a/lv-config.lua +++ /dev/null @@ -1,110 +0,0 @@ ---[[ -O is the global options object - -Formatters and linters should be -filled in as strings with either -a global executable or a path to -an executable -]] -- THESE ARE EXAMPLE CONFIGS FEEL FREE TO CHANGE TO WHATEVER YOU WANT --- general -O.auto_complete = true -O.colorscheme = 'spacegray' -O.auto_close_tree = 0 -O.wrap_lines = false -O.timeoutlen = 100 -O.document_highlight = true -O.extras = false -O.leader_key = ' ' -O.ignore_case = true -O.smart_case = true -O.lushmode = false - --- After changing plugin config it is recommended to run :PackerCompile -O.plugin.hop.active = false -O.plugin.dial.active = false -O.plugin.dashboard.active = true -O.plugin.matchup.active = false -O.plugin.colorizer.active = false -O.plugin.numb.active = false -O.plugin.ts_playground.active = false -O.plugin.indent_line.active = false -O.plugin.gitlinker.active = false -O.plugin.zen.active = false - --- dashboard --- O.dashboard.custom_header = {""} --- O.dashboard.footer = {""} - --- if you don't want all the parsers change this to a table of the ones you want -O.treesitter.ensure_installed = "all" -O.treesitter.ignore_install = {"haskell"} -O.treesitter.highlight.enabled = true - -O.lang.clang.diagnostics.virtual_text = false -O.lang.clang.diagnostics.signs = false -O.lang.clang.diagnostics.underline = false - --- python --- add things like O.python.formatter.yapf.exec_path --- add things like O.python.linter.flake8.exec_path --- add things like O.python.formatter.isort.exec_path -O.lang.python.formatter = 'yapf' --- O.python.linter = 'flake8' -O.lang.python.isort = true -O.lang.python.autoformat = true -O.lang.python.diagnostics.virtual_text = true -O.lang.python.diagnostics.signs = true -O.lang.python.diagnostics.underline = true -O.lang.python.analysis.type_checking = "off" -O.lang.python.analysis.auto_search_paths = true -O.lang.python.analysis.use_library_code_types = true - - --- lua --- TODO look into stylua -O.lang.lua.formatter = 'lua-format' --- O.lua.formatter = 'lua-format' -O.lang.lua.autoformat = false - --- javascript -O.lang.tsserver.formatter = 'prettier' -O.lang.tsserver.linter = nil -O.lang.tsserver.autoformat = true - --- json -O.lang.json.autoformat = true - --- ruby -O.lang.ruby.autoformat = true - --- go -O.lang.go.autoformat = true - --- rust -O.lang.rust.autoformat = true --- create custom autocommand field (This would be easy with lua) - --- Turn off relative_numbers --- O.relative_number = false - --- Turn off cursorline --- O.cursorline = false - --- Neovim turns the default cursor to 'Block' --- when switched back into terminal. --- This below line fixes that. Uncomment if needed. - --- vim.cmd('autocmd VimLeave,VimSuspend * set guicursor=a:ver90') -- Beam --- vim.cmd('autocmd VimLeave,VimSuspend * set guicursor=a:hor20') -- Underline - --- NOTE: Above code doesn't take a value from the terminal's cursor and --- replace it. It hardcodes the cursor shape. --- And I think `ver` means vertical and `hor` means horizontal. --- The numbers didn't make a difference in alacritty. Please change --- the number to something that suits your needs if it looks weird. - --- TODO --- custom autocommands --- user defined plugin config --- custom settings - diff --git a/utils/installer/install.sh b/utils/installer/install.sh index 10373fc3..edf46f09 100755 --- a/utils/installer/install.sh +++ b/utils/installer/install.sh @@ -101,7 +101,7 @@ installpacker() { cloneconfig() { echo "Cloning LunarVim configuration" git clone https://github.com/ChristianChiarulli/lunarvim.git ~/.config/nvim - # mv $HOME/.config/nvim/init.lua $HOME/.config/nvim/init.lua.tmp + mv $HOME/.config/nvim/utils/installer/lv-config.example.lua $HOME/.config/nvim/lv-config.lua # mv $HOME/.config/nvim/utils/init.lua $HOME/.config/nvim/init.lua nvim -u $HOME/.config/nvim/init.lua +PackerInstall # rm $HOME/.config/nvim/init.lua diff --git a/utils/installer/lv-config.example.lua b/utils/installer/lv-config.example.lua new file mode 100644 index 00000000..f990f2a0 --- /dev/null +++ b/utils/installer/lv-config.example.lua @@ -0,0 +1,110 @@ +--[[ +O is the global options object + +Formatters and linters should be +filled in as strings with either +a global executable or a path to +an executable +]] -- THESE ARE EXAMPLE CONFIGS FEEL FREE TO CHANGE TO WHATEVER YOU WANT +-- general +O.auto_complete = true +O.colorscheme = 'spacegray' +O.auto_close_tree = 0 +O.wrap_lines = false +O.timeoutlen = 100 +O.document_highlight = true +O.extras = false +O.leader_key = ' ' +O.ignore_case = true +O.smart_case = true +O.lushmode = false + +-- After changing plugin config it is recommended to run :PackerCompile +O.plugin.hop.active = false +O.plugin.dial.active = false +O.plugin.dashboard.active = true +O.plugin.matchup.active = false +O.plugin.colorizer.active = false +O.plugin.numb.active = false +O.plugin.ts_playground.active = false +O.plugin.indent_line.active = false +O.plugin.gitlinker.active = false +O.plugin.zen.active = false + +-- dashboard +-- O.dashboard.custom_header = {""} +-- O.dashboard.footer = {""} + +-- if you don't want all the parsers change this to a table of the ones you want +O.treesitter.ensure_installed = "all" +O.treesitter.ignore_install = {"haskell"} +O.treesitter.highlight.enabled = true + +O.lang.clang.diagnostics.virtual_text = false +O.lang.clang.diagnostics.signs = false +O.lang.clang.diagnostics.underline = false + +-- python +-- add things like O.python.formatter.yapf.exec_path +-- add things like O.python.linter.flake8.exec_path +-- add things like O.python.formatter.isort.exec_path +O.lang.python.formatter = 'yapf' +-- O.python.linter = 'flake8' +O.lang.python.isort = true +O.lang.python.autoformat = true +O.lang.python.diagnostics.virtual_text = true +O.lang.python.diagnostics.signs = true +O.lang.python.diagnostics.underline = true +O.lang.python.analysis.type_checking = "off" +O.lang.python.analysis.auto_search_paths = true +O.lang.python.analysis.use_library_code_types = true + + +-- lua +-- TODO look into stylua +O.lang.lua.formatter = 'lua-format' +-- O.lua.formatter = 'lua-format' +O.lang.lua.autoformat = false + +-- javascript +O.lang.tsserver.formatter = 'prettier' +O.lang.tsserver.linter = nil +O.lang.tsserver.autoformat = true + +-- json +O.lang.json.autoformat = true + +-- ruby +O.lang.ruby.autoformat = true + +-- go +O.lang.go.autoformat = true + +-- rust +O.lang.rust.autoformat = true +-- create custom autocommand field (This would be easy with lua) + +-- Turn off relative_numbers +-- O.relative_number = false + +-- Turn off cursorline +-- O.cursorline = false + +-- Neovim turns the default cursor to 'Block' +-- when switched back into terminal. +-- This below line fixes that. Uncomment if needed. + +-- vim.cmd('autocmd VimLeave,VimSuspend * set guicursor=a:ver90') -- Beam +-- vim.cmd('autocmd VimLeave,VimSuspend * set guicursor=a:hor20') -- Underline + +-- NOTE: Above code doesn't take a value from the terminal's cursor and +-- replace it. It hardcodes the cursor shape. +-- And I think `ver` means vertical and `hor` means horizontal. +-- The numbers didn't make a difference in alacritty. Please change +-- the number to something that suits your needs if it looks weird. + +-- TODO +-- custom autocommands +-- user defined plugin config +-- custom settings + -- cgit v1.2.3