diff options
author | christianchiarulli <[email protected]> | 2021-07-09 21:01:23 -0400 |
---|---|---|
committer | christianchiarulli <[email protected]> | 2021-07-09 21:01:23 -0400 |
commit | b8182d5aeecd50ad6a7d4f5b9b1a8ccbd8bbad02 (patch) | |
tree | ffd8fd765b36cf0f4dc353074bf31225beca67ce | |
parent | 0ce8dfd998f85e2b1dd6fa78643884a267460b0e (diff) |
refactor plugin config
-rw-r--r-- | init.lua | 5 | ||||
-rw-r--r-- | lua/default-config.lua | 33 | ||||
-rw-r--r-- | lua/lv-dashboard/config.lua | 49 | ||||
-rw-r--r-- | lua/lv-dashboard/init.lua | 38 | ||||
-rw-r--r-- | lua/lv-floatterm/config.lua | 10 | ||||
-rw-r--r-- | lua/lv-floatterm/init.lua | 17 | ||||
-rw-r--r-- | lua/lv-galaxyline/config.lua | 22 | ||||
-rw-r--r-- | lua/lv-galaxyline/init.lua | 22 | ||||
-rw-r--r-- | lua/lv-gitsigns/config.lua | 47 | ||||
-rw-r--r-- | lua/lv-gitsigns/init.lua | 48 | ||||
-rw-r--r-- | lua/lv-telescope/config.lua | 82 | ||||
-rw-r--r-- | lua/lv-telescope/init.lua | 87 | ||||
-rw-r--r-- | lua/lv-which-key/init.lua | 11 | ||||
-rw-r--r-- | lua/plugins.lua | 7 | ||||
-rw-r--r-- | lua/settings.lua | 24 |
15 files changed, 259 insertions, 243 deletions
@@ -6,10 +6,7 @@ require "plugins" vim.g.colors_name = O.colorscheme -- Colorscheme must get called after plugins are loaded or it will break new installs. require "lv-utils" require "lv-treesitter" -if O.plugin.dashboard.active then - require("lv-dashboard").config() -end --- TODO these gues need to be in language files +-- TODO these guys need to be in language files -- require "lsp" -- if O.lang.emmet.active then -- require "lsp.emmet-ls" diff --git a/lua/default-config.lua b/lua/default-config.lua index 47ecf8bd..455832c0 100644 --- a/lua/default-config.lua +++ b/lua/default-config.lua @@ -72,8 +72,6 @@ O = { plugin = { -- Builtins - dashboard = { active = false }, - -- zen = { active = false }, ts_playground = { active = false }, ts_context_commentstring = { active = false }, ts_hintobjects = { active = false }, @@ -88,7 +86,6 @@ O = { dap_install = { active = false }, lush = { active = false }, diffview = { active = false }, - floatterm = { active = false }, }, user_which_key = {}, @@ -234,32 +231,12 @@ O = { vim = {}, yaml = {}, }, - - dashboard = { - - custom_header = { - "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⣀⣀⣀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", - "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣤⣶⣾⠿⠿⠟⠛⠛⠛⠛⠿⠿⣿⣷⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", - " ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣾⡿⠋⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠿⣷⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", - "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⡿⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⢿⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", - "⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠒⠂⠉⠉⠉⠉⢩⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", - "⠀⠀⠀⠀⠀⠀⠀⠀⠸⡀⠀⠀⠀⠀⠀⢰⣿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", - "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⠠⡀⠀⠀⢀⣾⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", - "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠢⢀⣸⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", - "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡧⢄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", - "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡇⠀⠈⠁⠒⠤⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", - "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣇⠀⠀⠀⠀⠀⠀⠉⠢⠤⠀⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⡟⠈⠑⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", - "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠑⠒⠤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⡇⠀⠀⢀⣣⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", - "⠀⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠀⠀⠒⠢⠤⠄⣀⣀⠀⠀⠀⢠⣿⡟⠀⠀⠀⣺⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", - "⠀⣿⠇⠀⠀⠀⠀⠀⣤⡄⠀⠀⢠⣤⡄⠀⢨⣭⣠⣤⣤⣤⡀⠀⠀⢀⣤⣤⣤⣤⡄⠀⠀⠀⣤⣄⣤⣤⣤⠀⠀⣿⣯⠉⠉⣿⡟⠀⠈⢩⣭⣤⣤⠀⠀⠀⠀⣠⣤⣤⣤⣄⣤⣤", - "⢠⣿⠀⠀⠀⠀⠀⠀⣿⠃⠀⠀⣸⣿⠁⠀⣿⣿⠉⠀⠈⣿⡇⠀⠀⠛⠋⠀⠀⢹⣿⠀⠀⠀⣿⠏⠀⠸⠿⠃⠀⣿⣿⠀⣰⡟⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⣿⡟⢸⣿⡇⢀⣿", - "⣸⡇⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⣿⡟⠀⢠⣿⡇⠀⠀⢰⣿⡇⠀⣰⣾⠟⠛⠛⣻⡇⠀⠀⢸⡿⠀⠀⠀⠀⠀⠀⢻⣿⢰⣿⠀⠀⠀⠀⠀⠀⣾⡇⠀⠀⠀⢸⣿⠇⢸⣿⠀⢸⡏", - "⣿⣧⣤⣤⣤⡄⠀⠘⣿⣤⣤⡤⣿⠇⠀⢸⣿⠁⠀⠀⣼⣿⠀⠀⢿⣿⣤⣤⠔⣿⠃⠀⠀⣾⡇⠀⠀⠀⠀⠀⠀⢸⣿⣿⠋⠀⠀⠀⢠⣤⣤⣿⣥⣤⡄⠀⣼⣿⠀⣸⡏⠀⣿⠃", - "⠉⠉⠉⠉⠉⠁⠀⠀⠈⠉⠉⠀⠉⠀⠀⠈⠉⠀⠀⠀⠉⠉⠀⠀⠀⠉⠉⠁⠈⠉⠀⠀⠀⠉⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠀⠀⠀⠀⠈⠉⠉⠉⠉⠉⠁⠀⠉⠁⠀⠉⠁⠀⠉⠀", - }, - footer = { "chrisatmachine.com" }, - }, } require "lv-zen.config" require "lv-compe.config" +require "lv-dashboard.config" +require "lv-floatterm.config" +require "lv-galaxyline.config" +require "lv-gitsigns.config" +require "lv-telescope.config" diff --git a/lua/lv-dashboard/config.lua b/lua/lv-dashboard/config.lua index e69de29b..a6240c0d 100644 --- a/lua/lv-dashboard/config.lua +++ b/lua/lv-dashboard/config.lua @@ -0,0 +1,49 @@ +O.plugin.dashboard = { + active = false, + search_handler = "telescope", + custom_header = { + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⣀⣀⣀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣤⣶⣾⠿⠿⠟⠛⠛⠛⠛⠿⠿⣿⣷⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + " ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣾⡿⠋⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠿⣷⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⡿⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⢿⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠒⠂⠉⠉⠉⠉⢩⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠸⡀⠀⠀⠀⠀⠀⢰⣿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⠠⡀⠀⠀⢀⣾⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠢⢀⣸⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡧⢄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡇⠀⠈⠁⠒⠤⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣇⠀⠀⠀⠀⠀⠀⠉⠢⠤⠀⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⡟⠈⠑⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠑⠒⠤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⡇⠀⠀⢀⣣⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠀⠀⠒⠢⠤⠄⣀⣀⠀⠀⠀⢠⣿⡟⠀⠀⠀⣺⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⣿⠇⠀⠀⠀⠀⠀⣤⡄⠀⠀⢠⣤⡄⠀⢨⣭⣠⣤⣤⣤⡀⠀⠀⢀⣤⣤⣤⣤⡄⠀⠀⠀⣤⣄⣤⣤⣤⠀⠀⣿⣯⠉⠉⣿⡟⠀⠈⢩⣭⣤⣤⠀⠀⠀⠀⣠⣤⣤⣤⣄⣤⣤", + "⢠⣿⠀⠀⠀⠀⠀⠀⣿⠃⠀⠀⣸⣿⠁⠀⣿⣿⠉⠀⠈⣿⡇⠀⠀⠛⠋⠀⠀⢹⣿⠀⠀⠀⣿⠏⠀⠸⠿⠃⠀⣿⣿⠀⣰⡟⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⣿⡟⢸⣿⡇⢀⣿", + "⣸⡇⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⣿⡟⠀⢠⣿⡇⠀⠀⢰⣿⡇⠀⣰⣾⠟⠛⠛⣻⡇⠀⠀⢸⡿⠀⠀⠀⠀⠀⠀⢻⣿⢰⣿⠀⠀⠀⠀⠀⠀⣾⡇⠀⠀⠀⢸⣿⠇⢸⣿⠀⢸⡏", + "⣿⣧⣤⣤⣤⡄⠀⠘⣿⣤⣤⡤⣿⠇⠀⢸⣿⠁⠀⠀⣼⣿⠀⠀⢿⣿⣤⣤⠔⣿⠃⠀⠀⣾⡇⠀⠀⠀⠀⠀⠀⢸⣿⣿⠋⠀⠀⠀⢠⣤⣤⣿⣥⣤⡄⠀⣼⣿⠀⣸⡏⠀⣿⠃", + "⠉⠉⠉⠉⠉⠁⠀⠀⠈⠉⠉⠀⠉⠀⠀⠈⠉⠀⠀⠀⠉⠉⠀⠀⠀⠉⠉⠁⠈⠉⠀⠀⠀⠉⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠀⠀⠀⠀⠈⠉⠉⠉⠉⠉⠁⠀⠉⠁⠀⠉⠁⠀⠉⠀", + }, + + custom_section = { + a = { + description = { " Find File " }, + command = "Telescope find_files", + }, + b = { + description = { " Recently Used Files" }, + command = "Telescope oldfiles", + }, + -- c = { + -- description = { " Load Last Session " }, + -- command = "SessionLoad", + -- }, + c = { + description = { " Find Word " }, + command = "Telescope live_grep", + }, + d = { + description = { " Settings " }, + command = ":e " .. CONFIG_PATH .. "/lv-config.lua", + }, + }, + + footer = { "chrisatmachine.com" }, +} diff --git a/lua/lv-dashboard/init.lua b/lua/lv-dashboard/init.lua index 7e6fc060..b9e69ac1 100644 --- a/lua/lv-dashboard/init.lua +++ b/lua/lv-dashboard/init.lua @@ -3,37 +3,17 @@ local M = {} M.config = function() vim.g.dashboard_disable_at_vimenter = 0 - vim.g.dashboard_custom_header = O.dashboard.custom_header + vim.g.dashboard_custom_header = O.plugin.dashboard.custom_header - vim.g.dashboard_default_executive = "telescope" + vim.g.dashboard_default_executive = O.plugin.dashboard.search_handler - vim.g.dashboard_custom_section = { - a = { - description = { " Find File " }, - command = "Telescope find_files", - }, - b = { - description = { " Recently Used Files" }, - command = "Telescope oldfiles", - }, - -- c = { - -- description = { " Load Last Session " }, - -- command = "SessionLoad", - -- }, - c = { - description = { " Find Word " }, - command = "Telescope live_grep", - }, - d = { - description = { " Settings " }, - command = ":e " .. CONFIG_PATH .. "/lv-config.lua", - }, - -- f = { - -- description = { " Neovim Config Files" }, - -- command = "Telescope find_files cwd=" .. CONFIG_PATH, - -- }, - -- e = {description = {' Marks '}, command = 'Telescope marks'} - } + vim.g.dashboard_custom_section = O.plugin.dashboard.custom_section + + -- f = { + -- description = { " Neovim Config Files" }, + -- command = "Telescope find_files cwd=" .. CONFIG_PATH, + -- }, + -- e = {description = {' Marks '}, command = 'Telescope marks'} vim.cmd "let g:dashboard_session_directory = $HOME..'/.config/nvim/.sessions'" vim.cmd "let packages = len(globpath('~/.local/share/nvim/site/pack/packer/start', '*', 0, 1))" diff --git a/lua/lv-floatterm/config.lua b/lua/lv-floatterm/config.lua new file mode 100644 index 00000000..8a4e2238 --- /dev/null +++ b/lua/lv-floatterm/config.lua @@ -0,0 +1,10 @@ +O.plugin.floatterm = { + active = false, + dimensions = { + height = 0.9, + width = 0.9, + x = 0.5, + y = 0.3, + }, + border = "single", -- or 'double' +} diff --git a/lua/lv-floatterm/init.lua b/lua/lv-floatterm/init.lua index 94696db4..55992a92 100644 --- a/lua/lv-floatterm/init.lua +++ b/lua/lv-floatterm/init.lua @@ -6,26 +6,13 @@ M.config = function() return end - fterm.setup { - dimensions = { - height = 0.8, - width = 0.8, - x = 0.5, - y = 0.5, - }, - border = "single", -- or 'double' - } + fterm.setup(O.plugin.floatterm) -- Create LazyGit Terminal local term = require "FTerm.terminal" local lazy = term:new():setup { cmd = "lazygit", - dimensions = { - height = 0.9, - width = 0.9, - x = 0.5, - y = 0.3, - }, + dimensions = O.plugin.floatterm.dimensions, } local function is_installed(exe) diff --git a/lua/lv-galaxyline/config.lua b/lua/lv-galaxyline/config.lua new file mode 100644 index 00000000..76fe0668 --- /dev/null +++ b/lua/lv-galaxyline/config.lua @@ -0,0 +1,22 @@ +O.plugin.galaxyline = { + active = true, + colors = { + bg = "#2E2E2E", + yellow = "#DCDCAA", + dark_yellow = "#D7BA7D", + cyan = "#4EC9B0", + green = "#608B4E", + light_green = "#B5CEA8", + string_orange = "#CE9178", + orange = "#FF8800", + purple = "#C586C0", + magenta = "#D16D9E", + grey = "#858585", + blue = "#569CD6", + vivid_blue = "#4FC1FF", + light_blue = "#9CDCFE", + red = "#D16969", + error_red = "#F44747", + info_yellow = "#FFCC66", + }, +} diff --git a/lua/lv-galaxyline/init.lua b/lua/lv-galaxyline/init.lua index c7a8fa55..2cb1fd24 100644 --- a/lua/lv-galaxyline/init.lua +++ b/lua/lv-galaxyline/init.lua @@ -6,27 +6,7 @@ if not status_ok then return end -- get my theme in galaxyline repo --- local colors = require('galaxyline.theme').default -local colors = { - bg = "#2E2E2E", - -- bg = '#292D38', - yellow = "#DCDCAA", - dark_yellow = "#D7BA7D", - cyan = "#4EC9B0", - green = "#608B4E", - light_green = "#B5CEA8", - string_orange = "#CE9178", - orange = "#FF8800", - purple = "#C586C0", - magenta = "#D16D9E", - grey = "#858585", - blue = "#569CD6", - vivid_blue = "#4FC1FF", - light_blue = "#9CDCFE", - red = "#D16969", - error_red = "#F44747", - info_yellow = "#FFCC66", -} +local colors = O.plugin.galaxyline.colors local condition = require "galaxyline.condition" local gls = gl.section diff --git a/lua/lv-gitsigns/config.lua b/lua/lv-gitsigns/config.lua new file mode 100644 index 00000000..58057a14 --- /dev/null +++ b/lua/lv-gitsigns/config.lua @@ -0,0 +1,47 @@ +O.plugin.gitsigns = { + signs = { + -- TODO add hl to colorscheme + add = { + hl = "GitSignsAdd", + text = "▎", + numhl = "GitSignsAddNr", + linehl = "GitSignsAddLn", + }, + change = { + hl = "GitSignsChange", + text = "▎", + numhl = "GitSignsChangeNr", + linehl = "GitSignsChangeLn", + }, + delete = { + hl = "GitSignsDelete", + text = "契", + numhl = "GitSignsDeleteNr", + linehl = "GitSignsDeleteLn", + }, + topdelete = { + hl = "GitSignsDelete", + text = "契", + numhl = "GitSignsDeleteNr", + linehl = "GitSignsDeleteLn", + }, + changedelete = { + hl = "GitSignsChange", + text = "▎", + numhl = "GitSignsChangeNr", + linehl = "GitSignsChangeLn", + }, + }, + numhl = false, + linehl = false, + keymaps = { + -- Default keymap options + noremap = true, + buffer = true, + }, + watch_index = { interval = 1000 }, + sign_priority = 6, + update_debounce = 200, + status_formatter = nil, -- Use default + use_decoration_api = false, +} diff --git a/lua/lv-gitsigns/init.lua b/lua/lv-gitsigns/init.lua index 920c3120..dc1938b4 100644 --- a/lua/lv-gitsigns/init.lua +++ b/lua/lv-gitsigns/init.lua @@ -5,53 +5,7 @@ M.config = function() if not status_ok then return end - gitsigns.setup { - signs = { - -- TODO add hl to colorscheme - add = { - hl = "GitSignsAdd", - text = "▎", - numhl = "GitSignsAddNr", - linehl = "GitSignsAddLn", - }, - change = { - hl = "GitSignsChange", - text = "▎", - numhl = "GitSignsChangeNr", - linehl = "GitSignsChangeLn", - }, - delete = { - hl = "GitSignsDelete", - text = "契", - numhl = "GitSignsDeleteNr", - linehl = "GitSignsDeleteLn", - }, - topdelete = { - hl = "GitSignsDelete", - text = "契", - numhl = "GitSignsDeleteNr", - linehl = "GitSignsDeleteLn", - }, - changedelete = { - hl = "GitSignsChange", - text = "▎", - numhl = "GitSignsChangeNr", - linehl = "GitSignsChangeLn", - }, - }, - numhl = false, - linehl = false, - keymaps = { - -- Default keymap options - noremap = true, - buffer = true, - }, - watch_index = { interval = 1000 }, - sign_priority = 6, - update_debounce = 200, - status_formatter = nil, -- Use default - use_decoration_api = false, - } + gitsigns.setup(O.plugin.gitsigns) end return M diff --git a/lua/lv-telescope/config.lua b/lua/lv-telescope/config.lua new file mode 100644 index 00000000..49112bc2 --- /dev/null +++ b/lua/lv-telescope/config.lua @@ -0,0 +1,82 @@ +local status_ok, actions = pcall(require, "telescope.actions") +if not status_ok then + return +end + +O.plugin.telescope = { + defaults = { + find_command = { + "rg", + "--no-heading", + "--with-filename", + "--line-number", + "--column", + "--smart-case", + }, + prompt_prefix = " ", + selection_caret = " ", + entry_prefix = " ", + initial_mode = "insert", + selection_strategy = "reset", + sorting_strategy = "descending", + layout_strategy = "horizontal", + layout_config = { + width = 0.75, + prompt_position = "bottom", + preview_cutoff = 120, + horizontal = { mirror = false }, + vertical = { mirror = false }, + }, + file_sorter = require("telescope.sorters").get_fzy_sorter, + file_ignore_patterns = {}, + generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter, + path_display = { "shorten" }, + winblend = 0, + border = {}, + borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" }, + color_devicons = true, + use_less = true, + set_env = { ["COLORTERM"] = "truecolor" }, -- default = nil, + file_previewer = require("telescope.previewers").vim_buffer_cat.new, + grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new, + qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new, + + -- Developer configurations: Not meant for general override + buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker, + mappings = { + i = { + ["<C-c>"] = actions.close, + ["<C-j>"] = actions.move_selection_next, + ["<C-k>"] = actions.move_selection_previous, + -- ["<c-t>"] = trouble.open_with_trouble, + ["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist, + -- To disable a keymap, put [map] = false + -- So, to not map "<C-n>", just put + -- ["<c-x>"] = false, + -- ["<esc>"] = actions.close, + + -- Otherwise, just set the mapping to the function that you want it to be. + -- ["<C-i>"] = actions.select_horizontal, + + -- Add up multiple actions + ["<CR>"] = actions.select_default + actions.center, + + -- You can perform as many actions in a row as you like + -- ["<CR>"] = actions.select_default + actions.center + my_cool_custom_action, + }, + n = { + ["<C-j>"] = actions.move_selection_next, + ["<C-k>"] = actions.move_selection_previous, + -- ["<c-t>"] = trouble.open_with_trouble, + ["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist, + -- ["<C-i>"] = my_cool_custom_action, + }, + }, + }, + extensions = { + fzy_native = { + override_generic_sorter = false, + override_file_sorter = true, + }, + }, +} diff --git a/lua/lv-telescope/init.lua b/lua/lv-telescope/init.lua index 39c7b951..0fe7f854 100644 --- a/lua/lv-telescope/init.lua +++ b/lua/lv-telescope/init.lua @@ -2,89 +2,4 @@ local status_ok, telescope = pcall(require, "telescope") if not status_ok then return end -local actions = require "telescope.actions" --- if O.plugin.trouble.active then --- local trouble = require("trouble.providers.telescope") --- end --- Global remapping ------------------------------- --- '--color=never', -telescope.setup { - defaults = { - find_command = { - "rg", - "--no-heading", - "--with-filename", - "--line-number", - "--column", - "--smart-case", - }, - prompt_prefix = " ", - selection_caret = " ", - entry_prefix = " ", - initial_mode = "insert", - selection_strategy = "reset", - sorting_strategy = "descending", - layout_strategy = "horizontal", - layout_config = { - width = 0.75, - prompt_position = "bottom", - preview_cutoff = 120, - horizontal = { mirror = false }, - vertical = { mirror = false }, - }, - file_sorter = require("telescope.sorters").get_fzy_sorter, - file_ignore_patterns = {}, - generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter, - path_display = { "shorten" }, - winblend = 0, - border = {}, - borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" }, - color_devicons = true, - use_less = true, - set_env = { ["COLORTERM"] = "truecolor" }, -- default = nil, - file_previewer = require("telescope.previewers").vim_buffer_cat.new, - grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new, - qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new, - - -- Developer configurations: Not meant for general override - buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker, - mappings = { - i = { - ["<C-c>"] = actions.close, - ["<C-j>"] = actions.move_selection_next, - ["<C-k>"] = actions.move_selection_previous, - -- ["<c-t>"] = trouble.open_with_trouble, - ["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist, - -- To disable a keymap, put [map] = false - -- So, to not map "<C-n>", just put - -- ["<c-x>"] = false, - -- ["<esc>"] = actions.close, - - -- Otherwise, just set the mapping to the function that you want it to be. - -- ["<C-i>"] = actions.select_horizontal, - - -- Add up multiple actions - ["<CR>"] = actions.select_default + actions.center, - - -- You can perform as many actions in a row as you like - -- ["<CR>"] = actions.select_default + actions.center + my_cool_custom_action, - }, - n = { - ["<C-j>"] = actions.move_selection_next, - ["<C-k>"] = actions.move_selection_previous, - -- ["<c-t>"] = trouble.open_with_trouble, - ["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist, - -- ["<C-i>"] = my_cool_custom_action, - }, - }, - }, - extensions = { - fzy_native = { - override_generic_sorter = false, - override_file_sorter = true, - }, - }, -} - --- require'telescope'.load_extension('project') +telescope.setup(O.plugin.telescope) diff --git a/lua/lv-which-key/init.lua b/lua/lv-which-key/init.lua index f4551922..6ae12dd3 100644 --- a/lua/lv-which-key/init.lua +++ b/lua/lv-which-key/init.lua @@ -164,10 +164,7 @@ local mappings = { k = { "<cmd>lua vim.lsp.diagnostic.goto_prev({popup_opts = {border = O.lsp.popup_border}})<cr>", "Prev Diagnostic" }, q = { "<cmd>Telescope quickfix<cr>", "Quickfix" }, r = { "<cmd>lua vim.lsp.buf.rename()<cr>", "Rename" }, - s = { - O.plugin.symbol_outline.active and "<cmd>SymbolsOutline<cr>" or "<cmd> Telescope lsp_document_symbols<cr>", - "Document Symbols", - }, + s = { "<cmd> Telescope lsp_document_symbols<cr>", "Document Symbols" }, S = { "<cmd>Telescope lsp_dynamic_workspace_symbols<cr>", "Workspace Symbols", @@ -191,11 +188,6 @@ local mappings = { }, } -if O.plugin.symbol_outline.active then - vim.api.nvim_set_keymap("n", "<leader>o", ":SymbolsOutline<CR>", { noremap = true, silent = true }) - mappings["o"] = "Symbols outline" -end - if O.plugin.ts_playground.active then vim.api.nvim_set_keymap("n", "<leader>Th", ":TSHighlightCapturesUnderCursor<CR>", { noremap = true, silent = true }) mappings[""] = "Highlight Capture" @@ -205,6 +197,7 @@ if O.plugin.zen.active then vim.api.nvim_set_keymap("n", "<leader>z", ":ZenMode<CR>", { noremap = true, silent = true }) mappings["z"] = "Zen" end + if O.plugin.telescope_project.active then -- open projects vim.api.nvim_set_keymap( diff --git a/lua/plugins.lua b/lua/plugins.lua index c99a212f..d107657d 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -140,10 +140,9 @@ return require("packer").startup(function(use) use { "ChristianChiarulli/dashboard-nvim", event = "BufWinEnter", - -- cmd = { "Dashboard", "DashboardNewFile", "DashboardJumpMarks" }, - -- config = function() - -- require("lv-dashboard").config() - -- end, + config = function() + require("lv-dashboard").config() + end, disable = not O.plugin.dashboard.active, -- opt = true, } diff --git a/lua/settings.lua b/lua/settings.lua index cce8d87e..04a302aa 100644 --- a/lua/settings.lua +++ b/lua/settings.lua @@ -58,3 +58,27 @@ opt.signcolumn = "yes" -- always show the sign column, otherwise it would shift opt.wrap = O.wrap_lines -- display lines as one long line opt.spell = O.spell opt.spelllang = O.spelllang +opt.scrolloff = 8 -- is one of my fav +--local disabled_built_ins = { +-- "netrw", +-- "netrwPlugin", +-- "netrwSettings", +-- "netrwFileHandlers", +-- "gzip", +-- "zip", +-- "zipPlugin", +-- "tar", +-- "tarPlugin", -- 'man', +-- "getscript", +-- "getscriptPlugin", +-- "vimball", +-- "vimballPlugin", +-- "2html_plugin", +-- "logipat", +-- "rrhelper", +-- "spellfile_plugin", +-- -- 'matchit', 'matchparen', 'shada_plugin', +--} +--for _, plugin in pairs(disabled_built_ins) do +-- vim.g["loaded_" .. plugin] = 1 +--end |