diff options
| author | christianchiarulli <[email protected]> | 2021-07-06 12:28:50 -0400 | 
|---|---|---|
| committer | christianchiarulli <[email protected]> | 2021-07-06 12:28:50 -0400 | 
| commit | f22e1bd8cb6a38fdcad83b96d7739af778cd9d1d (patch) | |
| tree | dbd52ee15583f746f21e5eae157e546388ee206d /lua | |
| parent | 20485971641a9d916640ccad05586a641c984ed6 (diff) | |
| parent | 68bfac0468ea4d5d7faf5bede0a4ab8cb5572f0c (diff) | |
cleanup and stability improvements0.4.1
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/default-config.lua | 97 | ||||
| -rw-r--r-- | lua/keymappings.lua | 15 | ||||
| -rw-r--r-- | lua/lsp/tailwindcss-ls.lua | 2 | ||||
| -rw-r--r-- | lua/lv-bufferline/init.lua | 73 | ||||
| -rw-r--r-- | lua/lv-compe/init.lua | 6 | ||||
| -rw-r--r-- | lua/lv-dial/init.lua | 30 | ||||
| -rw-r--r-- | lua/lv-galaxyline/init.lua | 60 | ||||
| -rw-r--r-- | lua/lv-gitblame/init.lua | 2 | ||||
| -rw-r--r-- | lua/lv-hop/init.lua | 9 | ||||
| -rw-r--r-- | lua/lv-lsp-rooter/init.lua | 5 | ||||
| -rw-r--r-- | lua/lv-matchup/init.lua | 7 | ||||
| -rw-r--r-- | lua/lv-quickscope/init.lua | 4 | ||||
| -rw-r--r-- | lua/lv-rnvimr/init.lua | 6 | ||||
| -rw-r--r-- | lua/lv-snap/init.lua | 14 | ||||
| -rw-r--r-- | lua/lv-spectre/init.lua | 50 | ||||
| -rw-r--r-- | lua/lv-treesitter/init.lua | 115 | ||||
| -rw-r--r-- | lua/lv-user/README.md | 5 | ||||
| -rw-r--r-- | lua/lv-which-key/init.lua | 42 | ||||
| -rw-r--r-- | lua/plugins.lua | 230 | 
19 files changed, 251 insertions, 521 deletions
| diff --git a/lua/default-config.lua b/lua/default-config.lua index e05fc9e3..fcf33799 100644 --- a/lua/default-config.lua +++ b/lua/default-config.lua @@ -29,7 +29,29 @@ O = {      ensure_installed = "all",      ignore_install = { "haskell" },      highlight = { enabled = true }, -    rainbow = { enabled = false }, +    -- The below are for treesitter-textobjects plugin +    textobj_prefixes = { +      goto_next = "]", -- Go to next +      goto_previous = "[", -- Go to previous +      inner = "i", -- Select inside +      outer = "a", -- Selct around +      swap = "<leader>a", -- Swap with next +    }, +    textobj_suffixes = { +      -- Start and End respectively for the goto keys +      -- for other keys it only uses the first +      ["function"] = { "f", "F" }, +      ["class"] = { "m", "M" }, +      ["parameter"] = { "a", "A" }, +      ["block"] = { "k", "K" }, +      ["conditional"] = { "i", "I" }, +      ["call"] = { "c", "C" }, +      ["loop"] = { "l", "L" }, +      ["statement"] = { "s", "S" }, +      ["comment"] = { "/", "?" }, +    }, +    -- The below is for treesitter hint textobjects plugin +    hint_labels = { "h", "j", "f", "d", "n", "v", "s", "l", "a" },    },    lsp = { @@ -39,13 +61,17 @@ O = {    database = { save_location = "~/.config/nvcode_db", auto_execute = 1 },    plugin = { -    -- TODO remove non built-ins      -- Builtins      dashboard = { active = false },      colorizer = { active = false },      zen = { active = false },      ts_playground = { active = false },      ts_context_commentstring = { active = false }, +    ts_hintobjects = { active = false }, +    ts_autotag = { active = false }, +    ts_rainbow = { active = false }, +    ts_textobjects = { active = false }, +    ts_textsubjects = { active = false },      telescope_fzy = { active = false },      telescope_project = { active = false },      indent_line = { active = false }, @@ -55,35 +81,9 @@ O = {      lazygit = { active = false },      lush = { active = false },      diffview = { active = false }, - -    ---------------------------------------------------------------------- -    -- Non builtins - -    octo = { active = false }, -    gitlinker = { active = false }, -    todo_comments = { active = false }, -    gist = { active = false }, -    git_blame = { active = false }, -    lsp_colors = { active = false }, -    ranger = { active = false }, -    hop = { active = false }, -    dial = { active = false }, -    matchup = { active = false }, -    numb = { active = false }, -    bqf = { active = false }, -    trouble = { active = false },      floatterm = { active = false }, -    spectre = { active = false }, -    lsp_rooter = { active = false }, -    markdown_preview = { active = false }, -    bracey = { active = false }, -    codi = { active = false }, +    trouble = { active = false },      sanegx = { active = false }, -    snap = { active = false }, -    tabnine = { active = false }, - - -    },    custom_plugins = { @@ -146,6 +146,7 @@ O = {        },      },      tailwindcss = { +      active = false,        filetypes = {          "html",          "css", @@ -219,25 +220,25 @@ O = {    dashboard = {      custom_header = { -      "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⣀⣀⣀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", -      "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣤⣶⣾⠿⠿⠟⠛⠛⠛⠛⠿⠿⣿⣷⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", -      "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀  ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣾⡿⠋⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠿⣷⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", -      "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⡿⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⢿⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", -      "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠒⠂⠉⠉⠉⠉⢩⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", -      "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⡀⠀⠀⠀⠀⠀⢰⣿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", -      "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⠠⡀⠀⠀⢀⣾⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", -      "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠢⢀⣸⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", -      "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡧⢄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", -      "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡇⠀⠈⠁⠒⠤⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", -      "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣇⠀⠀⠀⠀⠀⠀⠉⠢⠤⠀⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⡟⠈⠑⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", -      "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠑⠒⠤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⡇⠀⠀⢀⣣⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", -      "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠀⠀⠒⠢⠤⠄⣀⣀⠀⠀⠀⢠⣿⡟⠀⠀⠀⣺⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", -      "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⠇⠀⠀⠀⠀⠀⣤⡄⠀⠀⢠⣤⡄⠀⢨⣭⣠⣤⣤⣤⡀⠀⠀⢀⣤⣤⣤⣤⡄⠀⠀⠀⣤⣄⣤⣤⣤⠀⠀⣿⣯⠉⠉⣿⡟⠀⠈⢩⣭⣤⣤⠀⠀⠀⠀⣠⣤⣤⣤⣄⣤⣤⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", -      "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⠀⠀⠀⠀⠀⠀⣿⠃⠀⠀⣸⣿⠁⠀⣿⣿⠉⠀⠈⣿⡇⠀⠀⠛⠋⠀⠀⢹⣿⠀⠀⠀⣿⠏⠀⠸⠿⠃⠀⣿⣿⠀⣰⡟⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⣿⡟⢸⣿⡇⢀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", -      "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⡇⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⣿⡟⠀⢠⣿⡇⠀⠀⢰⣿⡇⠀⣰⣾⠟⠛⠛⣻⡇⠀⠀⢸⡿⠀⠀⠀⠀⠀⠀⢻⣿⢰⣿⠀⠀⠀⠀⠀⠀⣾⡇⠀⠀⠀⢸⣿⠇⢸⣿⠀⢸⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", -      "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣧⣤⣤⣤⡄⠀⠘⣿⣤⣤⡤⣿⠇⠀⢸⣿⠁⠀⠀⣼⣿⠀⠀⢿⣿⣤⣤⠔⣿⠃⠀⠀⣾⡇⠀⠀⠀⠀⠀⠀⢸⣿⣿⠋⠀⠀⠀⢠⣤⣤⣿⣥⣤⡄⠀⣼⣿⠀⣸⡏⠀⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", -      "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠉⠉⠉⠁⠀⠀⠈⠉⠉⠀⠉⠀⠀⠈⠉⠀⠀⠀⠉⠉⠀⠀⠀⠉⠉⠁⠈⠉⠀⠀⠀⠉⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠀⠀⠀⠀⠈⠉⠉⠉⠉⠉⠁⠀⠉⠁⠀⠉⠁⠀⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", +      "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⣀⣀⣀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", +      "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣤⣶⣾⠿⠿⠟⠛⠛⠛⠛⠿⠿⣿⣷⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", +      "  ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣾⡿⠋⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠿⣷⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", +      "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⡿⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⢿⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", +      "⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠒⠂⠉⠉⠉⠉⢩⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", +      "⠀⠀⠀⠀⠀⠀⠀⠀⠸⡀⠀⠀⠀⠀⠀⢰⣿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", +      "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⠠⡀⠀⠀⢀⣾⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", +      "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠢⢀⣸⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", +      "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡧⢄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", +      "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡇⠀⠈⠁⠒⠤⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", +      "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣇⠀⠀⠀⠀⠀⠀⠉⠢⠤⠀⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⡟⠈⠑⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", +      "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠑⠒⠤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⡇⠀⠀⢀⣣⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", +      "⠀⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠀⠀⠒⠢⠤⠄⣀⣀⠀⠀⠀⢠⣿⡟⠀⠀⠀⣺⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", +      "⠀⣿⠇⠀⠀⠀⠀⠀⣤⡄⠀⠀⢠⣤⡄⠀⢨⣭⣠⣤⣤⣤⡀⠀⠀⢀⣤⣤⣤⣤⡄⠀⠀⠀⣤⣄⣤⣤⣤⠀⠀⣿⣯⠉⠉⣿⡟⠀⠈⢩⣭⣤⣤⠀⠀⠀⠀⣠⣤⣤⣤⣄⣤⣤", +      "⢠⣿⠀⠀⠀⠀⠀⠀⣿⠃⠀⠀⣸⣿⠁⠀⣿⣿⠉⠀⠈⣿⡇⠀⠀⠛⠋⠀⠀⢹⣿⠀⠀⠀⣿⠏⠀⠸⠿⠃⠀⣿⣿⠀⣰⡟⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⣿⡟⢸⣿⡇⢀⣿", +      "⣸⡇⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⣿⡟⠀⢠⣿⡇⠀⠀⢰⣿⡇⠀⣰⣾⠟⠛⠛⣻⡇⠀⠀⢸⡿⠀⠀⠀⠀⠀⠀⢻⣿⢰⣿⠀⠀⠀⠀⠀⠀⣾⡇⠀⠀⠀⢸⣿⠇⢸⣿⠀⢸⡏", +      "⣿⣧⣤⣤⣤⡄⠀⠘⣿⣤⣤⡤⣿⠇⠀⢸⣿⠁⠀⠀⣼⣿⠀⠀⢿⣿⣤⣤⠔⣿⠃⠀⠀⣾⡇⠀⠀⠀⠀⠀⠀⢸⣿⣿⠋⠀⠀⠀⢠⣤⣤⣿⣥⣤⡄⠀⣼⣿⠀⣸⡏⠀⣿⠃", +      "⠉⠉⠉⠉⠉⠁⠀⠀⠈⠉⠉⠀⠉⠀⠀⠈⠉⠀⠀⠀⠉⠉⠀⠀⠀⠉⠉⠁⠈⠉⠀⠀⠀⠉⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠀⠀⠀⠀⠈⠉⠉⠉⠉⠉⠁⠀⠉⠁⠀⠉⠁⠀⠉⠀",      },      footer = { "chrisatmachine.com" },    }, -}
\ No newline at end of file +} diff --git a/lua/keymappings.lua b/lua/keymappings.lua index 2161b8e9..ea9c0e18 100644 --- a/lua/keymappings.lua +++ b/lua/keymappings.lua @@ -20,10 +20,17 @@ vim.cmd [[  -- TODO fix this  -- resize with arrows -vim.api.nvim_set_keymap("n", "<C-Up>", ":resize -2<CR>", { silent = true }) -vim.api.nvim_set_keymap("n", "<C-Down>", ":resize +2<CR>", { silent = true }) -vim.api.nvim_set_keymap("n", "<C-Left>", ":vertical resize -2<CR>", { silent = true }) -vim.api.nvim_set_keymap("n", "<C-Right>", ":vertical resize +2<CR>", { silent = true }) +if vim.fn.has("mac") == 1 then +  vim.api.nvim_set_keymap("n", "<A-Up>", ":resize -2<CR>", { silent = true }) +  vim.api.nvim_set_keymap("n", "<A-Down>", ":resize +2<CR>", { silent = true }) +  vim.api.nvim_set_keymap("n", "<A-Left>", ":vertical resize -2<CR>", { silent = true }) +  vim.api.nvim_set_keymap("n", "<A-Right>", ":vertical resize +2<CR>", { silent = true }) +else +  vim.api.nvim_set_keymap("n", "<C-Up>", ":resize -2<CR>", { silent = true }) +  vim.api.nvim_set_keymap("n", "<C-Down>", ":resize +2<CR>", { silent = true }) +  vim.api.nvim_set_keymap("n", "<C-Left>", ":vertical resize -2<CR>", { silent = true }) +  vim.api.nvim_set_keymap("n", "<C-Right>", ":vertical resize +2<CR>", { silent = true }) +end  -- better indenting  vim.api.nvim_set_keymap("v", "<", "<gv", { noremap = true, silent = true }) diff --git a/lua/lsp/tailwindcss-ls.lua b/lua/lsp/tailwindcss-ls.lua index 87cd924c..c56a8336 100644 --- a/lua/lsp/tailwindcss-ls.lua +++ b/lua/lsp/tailwindcss-ls.lua @@ -6,5 +6,7 @@ lspconfig.tailwindcss.setup {          "node", DATA_PATH .. "/lspinstall/tailwindcss/tailwindcss-intellisense/extension/dist/server/tailwindServer.js",          "--stdio"      }, +    filetypes = O.lang.tailwindcss.filetypes, +    root_dir = require("lspconfig/util").root_pattern("tailwind.config.js", "postcss.config.ts", ".postcssrc"),      on_attach = require'lsp'.common_on_attach  } diff --git a/lua/lv-bufferline/init.lua b/lua/lv-bufferline/init.lua deleted file mode 100644 index af1a2d20..00000000 --- a/lua/lv-bufferline/init.lua +++ /dev/null @@ -1,73 +0,0 @@ -local M = {} - -M.config = function() -  -- Buffer line setup -  require("bufferline").setup { -    options = { -      indicator_icon = "▎", -      buffer_close_icon = "", -      modified_icon = "●", -      close_icon = "", -      close_command = "bdelete %d", -      right_mouse_command = "bdelete! %d", -      left_trunc_marker = "", -      right_trunc_marker = "", -      offsets = { -        { -          filetype = "NvimTree", -          text = "", -          text_align = "center", -          padding = 1, -        }, -      }, -      show_tab_indicators = true, -      show_close_icon = false, -    }, -    highlights = { -      fill = { -        guifg = { attribute = "fg", highlight = "Normal" }, -        guibg = { attribute = "bg", highlight = "StatusLineNC" }, -      }, -      -- background = { -      --     guifg = {attribute = "fg", highlight = "Normal"}, -      --     guibg = {attribute = "bg", highlight = "StatusLine"} -      -- }, -      -- buffer_visible = { -      --     gui = "", -      --     guifg = {attribute = "fg", highlight = "Normal"}, -      --     guibg = {attribute = "bg", highlight = "Normal"} -      -- }, -      -- buffer_selected = { -      --     gui = "", -      --     guifg = {attribute = "fg", highlight = "Normal"}, -      --     guibg = {attribute = "bg", highlight = "Normal"} -      -- }, -      -- separator = { -      --     guifg = {attribute = "bg", highlight = "Normal"}, -      --     guibg = {attribute = "bg", highlight = "StatusLine"} -      -- }, -      -- separator_selected = { -      --     guifg = {attribute = "fg", highlight = "Special"}, -      --     guibg = {attribute = "bg", highlight = "Normal"} -      -- }, -      -- separator_visible = { -      --     guifg = {attribute = "fg", highlight = "Normal"}, -      --     guibg = {attribute = "bg", highlight = "StatusLineNC"} -      -- }, -      -- close_button = { -      --     guifg = {attribute = "fg", highlight = "Normal"}, -      --     guibg = {attribute = "bg", highlight = "StatusLine"} -      -- }, -      -- close_button_selected = { -      --     guifg = {attribute = "fg", highlight = "normal"}, -      --     guibg = {attribute = "bg", highlight = "normal"} -      -- }, -      -- close_button_visible = { -      --     guifg = {attribute = "fg", highlight = "normal"}, -      --     guibg = {attribute = "bg", highlight = "normal"} -      -- } -    }, -  } -end - -return M diff --git a/lua/lv-compe/init.lua b/lua/lv-compe/init.lua index 19998b62..5b86f27e 100644 --- a/lua/lv-compe/init.lua +++ b/lua/lv-compe/init.lua @@ -31,7 +31,7 @@ M.config = function()        nvim_lua = false,        spell = { kind = "   (Spell)" },        tags = false, -      vim_dadbod_completion = true, +      -- vim_dadbod_completion = true,        -- snippets_nvim = {kind = "  "},        -- ultisnips = {kind = "  "},        -- treesitter = {kind = "  "}, @@ -40,10 +40,6 @@ M.config = function()      },    } -  if O.plugin.tabnine.active then -    opt.source.tabnine = { kind = " ", priority = 200, max_reslts = 6 } -  end -    require("compe").setup(opt)    local t = function(str) diff --git a/lua/lv-dial/init.lua b/lua/lv-dial/init.lua deleted file mode 100644 index 842e86be..00000000 --- a/lua/lv-dial/init.lua +++ /dev/null @@ -1,30 +0,0 @@ -local M = {} - -M.config = function() -  vim.cmd [[ -nmap <C-a> <Plug>(dial-increment) -nmap <C-x> <Plug>(dial-decrement) -vmap <C-a> <Plug>(dial-increment) -vmap <C-x> <Plug>(dial-decrement) -vmap g<C-a> <Plug>(dial-increment-additional) -vmap g<C-x> <Plug>(dial-decrement-additional) -]] - -  local dial = require "dial" - -  dial.augends["custom#boolean"] = dial.common.enum_cyclic { -    name = "boolean", -    strlist = { "true", "false" }, -  } -  table.insert(dial.config.searchlist.normal, "custom#boolean") - -  -- For Languages which prefer True/False, e.g. python. -  dial.augends["custom#Boolean"] = dial.common.enum_cyclic { -    name = "Boolean", -    strlist = { "True", "False" }, -  } -  table.insert(dial.config.searchlist.normal, "custom#Boolean") - -end - -return M diff --git a/lua/lv-galaxyline/init.lua b/lua/lv-galaxyline/init.lua index efb6a988..2189eab3 100644 --- a/lua/lv-galaxyline/init.lua +++ b/lua/lv-galaxyline/init.lua @@ -26,51 +26,6 @@ local colors = {    info_yellow = "#FFCC66",  } --- galaxyline themes for Gruvbox and NVCode. --- Uncomment and change 'colors_colorschemeName' --- to 'colors' to enable. - --- Colors for Gruvbox --- local colors_gruvbox = { ---     bg = '#32302F', ---     yellow = '#FABD2F', ---     dark_yellow = '#D79921', ---     cyan = '#689D6A', ---     green = '#608B4E', ---     light_green = '#B8BB26', ---     string_orange = '#D65D0E', ---     orange = '#FE8019', ---     purple = '#B16286', ---     magenta = '#D3869B', ---     grey = '#A89984', ---     blue = '#458588', ---     -- vivid_blue = '#4FC1FF', ---     light_blue = '#83A598', ---     red = '#FB4834', ---     error_red = '#CC241D', ---     info_yellow = '#D79921' --- } --- colors for NVCode theme (very minimal changes) --- local colors_nvcode = { ---     bg = '#2E2E2E', ---     yellow = '#DCDCAA', ---     dark_yellow = '#D7BA7D', ---     cyan = '#4EC9B0', ---     green = '#608B4E', ---     light_green = '#B5CEA8', ---     string_orange = '#CE9178', ---     orange = '#FF8800', ---     purple = '#C586C0', ---     magenta = '#D16D9E', ---     grey = '#729CB3', ---     blue = '#569CD6', ---     vivid_blue = '#4FC1FF', ---     light_blue = '#9CDCFE', ---     red = '#D16969', ---     error_red = '#F44747', ---     info_yellow = '#FFCC66' --- } -  local condition = require "galaxyline.condition"  local gls = gl.section  gl.short_line_list = { "NvimTree", "vista", "dbui", "packer" } @@ -104,8 +59,8 @@ table.insert(gls.left, {        vim.api.nvim_command("hi GalaxyViMode guifg=" .. mode_color[vim.fn.mode()])        return "▊"      end, -    highlight = 'StatusLineNC' -    -- highlight = {colors.red, colors.bg} +    separator_highlight = "StatusLineSeparator", +    highlight = "StatusLineNC",    },  })  -- print(vim.fn.getbufvar(0, 'ts')) @@ -160,6 +115,15 @@ table.insert(gls.left, {    },  }) +table.insert(gls.left, { +  Filler = { +    provider = function() +      return " " +    end, +    highlight = "StatusLineGitDelete", +  }, +}) +  table.insert(gls.right, {    DiagnosticError = {      provider = "DiagnosticError", @@ -209,7 +173,7 @@ table.insert(gls.right, {  })  local get_lsp_client = function(msg) -  msg = msg or "No Active LSP Client" +  msg = msg or "LSP Inactive"    local buf_ft = vim.api.nvim_buf_get_option(0, "filetype")    local clients = vim.lsp.get_active_clients()    if next(clients) == nil then diff --git a/lua/lv-gitblame/init.lua b/lua/lv-gitblame/init.lua deleted file mode 100644 index 3ed93a2b..00000000 --- a/lua/lv-gitblame/init.lua +++ /dev/null @@ -1,2 +0,0 @@ -vim.cmd "highlight default link gitblame SpecialComment" -vim.g.gitblame_enabled = 0 diff --git a/lua/lv-hop/init.lua b/lua/lv-hop/init.lua deleted file mode 100644 index 3d2610ce..00000000 --- a/lua/lv-hop/init.lua +++ /dev/null @@ -1,9 +0,0 @@ -local M = {} - -M.config = function() -  require("hop").setup() -  vim.api.nvim_set_keymap("n", "s", ":HopChar2<cr>", { silent = true }) -  vim.api.nvim_set_keymap("n", "S", ":HopWord<cr>", { silent = true }) -end - -return M diff --git a/lua/lv-lsp-rooter/init.lua b/lua/lv-lsp-rooter/init.lua deleted file mode 100644 index f4c16a9f..00000000 --- a/lua/lv-lsp-rooter/init.lua +++ /dev/null @@ -1,5 +0,0 @@ -require("lsp-rooter").setup { -  -- your configuration comes here -  -- or leave it empty to use the default settings -  -- refer to the configuration section below -} diff --git a/lua/lv-matchup/init.lua b/lua/lv-matchup/init.lua deleted file mode 100644 index 92df923b..00000000 --- a/lua/lv-matchup/init.lua +++ /dev/null @@ -1,7 +0,0 @@ -local M = {} - -M.config = function() -  vim.g.matchup_matchparen_offscreen = { method = "popup" } -end - -return M diff --git a/lua/lv-quickscope/init.lua b/lua/lv-quickscope/init.lua deleted file mode 100644 index 8ae441d3..00000000 --- a/lua/lv-quickscope/init.lua +++ /dev/null @@ -1,4 +0,0 @@ --- Trigger a highlight in the appropriate direction when pressing these keys: --- vim.cmd('let g:qs_highlight_on_keys = [\'f\', \'F\', \'t\', \'T\']') -vim.g.qs_highlight_on_keys = { "f", "F", "t", "T" } -vim.g.qs_max_chars = 150 diff --git a/lua/lv-rnvimr/init.lua b/lua/lv-rnvimr/init.lua deleted file mode 100644 index d05307b1..00000000 --- a/lua/lv-rnvimr/init.lua +++ /dev/null @@ -1,6 +0,0 @@ --- Make Ranger replace netrw and be the file explorer --- vim.g.rnvimr_ex_enable = 1 -vim.g.rnvimr_draw_border = 1 -vim.g.rnvimr_pick_enable = 1 -vim.g.rnvimr_bw_enable = 1 -vim.api.nvim_set_keymap("n", "-", ":RnvimrToggle<CR>", { noremap = true, silent = true }) diff --git a/lua/lv-snap/init.lua b/lua/lv-snap/init.lua deleted file mode 100644 index c37f068a..00000000 --- a/lua/lv-snap/init.lua +++ /dev/null @@ -1,14 +0,0 @@ -local M = {} - -M.config = function() -  local snap = require "snap" -  local layout = snap.get("layout").bottom -  local file = snap.config.file:with { consumer = "fzy", layout = layout } -  local vimgrep = snap.config.vimgrep:with { layout = layout } -  snap.register.command("find_files", file { producer = "ripgrep.file" }) -  snap.register.command("buffers", file { producer = "vim.buffer" }) -  snap.register.command("oldfiles", file { producer = "vim.oldfile" }) -  snap.register.command("live_grep", vimgrep {}) -end - -return M diff --git a/lua/lv-spectre/init.lua b/lua/lv-spectre/init.lua deleted file mode 100644 index cd7757f3..00000000 --- a/lua/lv-spectre/init.lua +++ /dev/null @@ -1,50 +0,0 @@ -require("spectre").setup { -  mapping = { -    ["toggle_line"] = { -      map = "dd", -      cmd = "<cmd>lua require('spectre').toggle_line()<CR>", -      desc = "toggle current item", -    }, -    ["enter_file"] = { -      map = "<cr>", -      cmd = "<cmd>lua require('spectre.actions').select_entry()<CR>", -      desc = "goto current file", -    }, -    ["send_to_qf"] = { -      map = "<Blash>q", -      cmd = "<cmd>lua require('spectre.actions').send_to_qf()<CR>", -      desc = "send all item to quickfix", -    }, -    ["replace_cmd"] = { -      map = "<Bslash>c", -      cmd = "<cmd>lua require('spectre.actions').replace_cmd()<CR>", -      desc = "input replace vim command", -    }, -    ["show_option_menu"] = { -      map = "<Bslash>o", -      cmd = "<cmd>lua require('spectre').show_options()<CR>", -      desc = "show option", -    }, -    ["run_replace"] = { -      map = "<Bslash>R", -      cmd = "<cmd>lua require('spectre.actions').run_replace()<CR>", -      desc = "replace all", -    }, -    ["change_view_mode"] = { -      map = "<Bslash>v", -      cmd = "<cmd>lua require('spectre').change_view()<CR>", -      desc = "change result view mode", -    }, -    ["toggle_ignore_case"] = { -      map = "ti", -      cmd = "<cmd>lua require('spectre').change_options('ignore-case')<CR>", -      desc = "toggle ignore case", -    }, -    ["toggle_ignore_hidden"] = { -      map = "th", -      cmd = "<cmd>lua require('spectre').change_options('hidden')<CR>", -      desc = "toggle search hidden", -    }, -    -- you can put your mapping here it only use normal mode -  }, -} diff --git a/lua/lv-treesitter/init.lua b/lua/lv-treesitter/init.lua index ea7ff56f..27877f03 100644 --- a/lua/lv-treesitter/init.lua +++ b/lua/lv-treesitter/init.lua @@ -1,6 +1,85 @@ --- if not package.loaded['nvim-treesitter'] then ---   return --- end +-- TODO refacor this whole file and treesitter in general +-- if not package.loaded['nvim-treesitter'] then return end +-- +-- Custom parsers +-- local parser_config = require("nvim-treesitter.parsers").get_parser_configs() +-- parser_config.make = { +--     install_info = { +--         url = "https://github.com/alemuller/tree-sitter-make", -- local path or git repo +--         files = {"src/parser.c"}, +--         requires_generate_from_grammar = true +--     } +-- } +-- parser_config.just = { +--     install_info = { +--         url = "~/dev/tree-sitter-just", -- local path or git repo +--         files = {"src/parser.c"} +--     } +--     -- filetype = "just", -- if filetype does not agrees with parser name +--     -- used_by = {"bar", "baz"} -- additional filetypes that use this parser +-- } +-- Custom text objects +local textobj_prefixes = O.treesitter.textobj_prefixes +local textobj_suffixes = O.treesitter.textobj_suffixes +local textobj_sel_keymaps = {} +local textobj_swap_keymaps = {} +local textobj_move_keymaps = { +  enable = O.plugin.ts_textobjects, +  set_jumps = true, -- whether to set jumps in the jumplist +  goto_next_start = {}, +  goto_next_end = {}, +  goto_previous_start = {}, +  goto_previous_end = {}, +} +for obj, suffix in pairs(textobj_suffixes) do +  if textobj_prefixes["goto_next"] ~= nil then +    textobj_move_keymaps["goto_next_start"][textobj_prefixes["goto_next"] .. suffix[1]] = "@" .. obj .. ".outer" +    textobj_move_keymaps["goto_next_end"][textobj_prefixes["goto_next"] .. suffix[2]] = "@" .. obj .. ".outer" +  end +  if textobj_prefixes["goto_prev"] ~= nil then +    textobj_move_keymaps["goto_previous_start"][textobj_prefixes["goto_previous"] .. suffix[2]] = "@" .. obj .. ".outer" +    textobj_move_keymaps["goto_previous_end"][textobj_prefixes["goto_previous"] .. suffix[1]] = "@" .. obj .. ".outer" +  end + +  if textobj_prefixes["inner"] ~= nil then +    textobj_sel_keymaps[textobj_prefixes["inner"] .. suffix[1]] = "@" .. obj .. ".inner" +  end +  if textobj_prefixes["outer"] ~= nil then +    textobj_sel_keymaps[textobj_prefixes["outer"] .. suffix[1]] = "@" .. obj .. ".outer" +  end + +  if textobj_prefixes["swap"] ~= nil then +    textobj_swap_keymaps[textobj_prefixes["swap"] .. suffix[1]] = "@" .. obj .. ".outer" +  end +end +vim.g.ts_hint_textobject_keys = O.treesitter.hint_labels -- Requires https://github.com/mfussenegger/nvim-ts-hint-textobject/pull/2 + +-- Add which key menu entries +local status, wk = pcall(require, "which-key") +if status then +  local normal = { +    mode = "n", -- Normal mode +  } +  local operators = { +    mode = "o", -- Operator mode +  } +  wk.register(textobj_sel_keymaps, operators) +  wk.register({ +    ["m"] = "Hint Objects", +    ["."] = "Textsubject", +    [";"] = "Textsubject-big", +  }, operators) +  wk.register(textobj_swap_keymaps, normal) +  wk.register({ +    [textobj_prefixes["swap"]] = "Swap", +    -- [textobj_prefixes["goto_next"]] = "Jump [", +    -- [textobj_prefixes["goto_previous"]] = "Jump ]" +  }, normal) +  wk.register(textobj_move_keymaps["goto_next_start"], normal) +  wk.register(textobj_move_keymaps["goto_next_end"], normal) +  wk.register(textobj_move_keymaps["goto_previous_start"], normal) +  wk.register(textobj_move_keymaps["goto_previous_end"], normal) +end  require("nvim-treesitter.configs").setup {    ensure_installed = O.treesitter.ensure_installed, -- one of "all", "maintained" (parsers with maintainers), or a list of languages @@ -11,13 +90,32 @@ require("nvim-treesitter.configs").setup {    },    highlight = {      enable = O.treesitter.highlight.enabled, -- false will disable the whole extension +    additional_vim_regex_highlighting = true, +    disable = { "latex" }, +  }, +  context_commentstring = { +    enable = O.plugin.ts_context_commentstring.active, +    config = { css = "// %s" },    }, -  context_commentstring = { enable = O.plugin.ts_context_commentstring, config = { css = "// %s" } },    -- indent = {enable = true, disable = {"python", "html", "javascript"}},    -- TODO seems to be broken    indent = { enable = { "javascriptreact" } }, -  autotag = { enable = true }, - +  autotag = { enable = O.plugin.ts_autotag.active }, +  textobjects = { +    swap = { +      enable = O.plugin.ts_textobjects, +      swap_next = textobj_swap_keymaps, +    }, +    move = textobj_move_keymaps, +    select = { +      enable = O.plugin.ts_textobjects, +      keymaps = textobj_sel_keymaps, +    }, +  }, +  textsubjects = { +    enable = O.plugin.ts_textsubjects, +    keymaps = { ["."] = "textsubjects-smart", [";"] = "textsubjects-big" }, +  },    playground = {      enable = O.plugin.ts_playground.active,      disable = {}, @@ -36,4 +134,9 @@ require("nvim-treesitter.configs").setup {        show_help = "?",      },    }, +  rainbow = { +    enable = O.plugin.ts_rainbow.active, +    extended_mode = true, -- Highlight also non-parentheses delimiters, boolean or table: lang -> boolean +    max_file_lines = 1000, -- Do not enable for files with more than 1000 lines, int +  },  } diff --git a/lua/lv-user/README.md b/lua/lv-user/README.md new file mode 100644 index 00000000..789001a2 --- /dev/null +++ b/lua/lv-user/README.md @@ -0,0 +1,5 @@ +# User Config + +If you have found this directory then you are probably advanced enough to add your own config. All `lua` files you create here will be available in lv-config. + +**NOTE** I may update this readme in the future so I recommend not changing anything in this file specifically diff --git a/lua/lv-which-key/init.lua b/lua/lv-which-key/init.lua index 084be113..5fb3c92d 100644 --- a/lua/lv-which-key/init.lua +++ b/lua/lv-which-key/init.lua @@ -72,12 +72,7 @@ vim.api.nvim_set_keymap(  --                         ":NvimTreeToggle<CR>",  --                         {noremap = true, silent = true}) --- telescope or snap -if O.plugin.snap.active then -  vim.api.nvim_set_keymap("n", "<Leader>f", ":Snap find_files<CR>", { noremap = true, silent = true }) -else -  vim.api.nvim_set_keymap("n", "<Leader>f", ":Telescope find_files<CR>", { noremap = true, silent = true }) -end +vim.api.nvim_set_keymap("n", "<Leader>f", ":Telescope find_files<CR>", { noremap = true, silent = true })  -- dashboard  vim.api.nvim_set_keymap("n", "<Leader>;", ":Dashboard<CR>", { noremap = true, silent = true }) @@ -101,7 +96,7 @@ local mappings = {    b = {      name = "Buffers",      j = { "<cmd>BufferPick<cr>", "jump to buffer" }, -    f = { O.plugin.snap.active and "<cmd>Snap buffers<cr>" or "<cmd>Telescope buffers<cr>", "Find buffer" }, +    f = { "<cmd>Telescope buffers<cr>", "Find buffer" },      w = { "<cmd>BufferWipeout<cr>", "wipeout buffer" },      e = {        "<cmd>BufferCloseAllButCurrent<cr>", @@ -224,21 +219,12 @@ local mappings = {      name = "Search",      b = { "<cmd>Telescope git_branches<cr>", "Checkout branch" },      c = { "<cmd>Telescope colorscheme<cr>", "Colorscheme" }, -    -- d = { -    --     "<cmd>Telescope lsp_document_diagnostics<cr>", -    --     "Document Diagnostics" -    -- }, -    -- D = { -    --     "<cmd>Telescope lsp_workspace_diagnostics<cr>", -    --     "Workspace Diagnostics" -    -- }, -    f = { O.plugin.snap.active and "<cmd>Snap find_files<cr>" or "<cmd>Telescope find_files<cr>", "Find File" }, +    f = { "<cmd>Telescope find_files<cr>", "Find File" },      h = { "<cmd>Telescope help_tags<cr>", "Find Help" }, -    -- m = {"<cmd>Telescope marks<cr>", "Marks"},      M = { "<cmd>Telescope man_pages<cr>", "Man Pages" }, -    r = { O.plugin.snap.active and "<cmd>Snap oldfiles<cr>" or "<cmd>Telescope oldfiles<cr>", "Open Recent File" }, +    r = { "<cmd>Telescope oldfiles<cr>", "Open Recent File" },      R = { "<cmd>Telescope registers<cr>", "Registers" }, -    t = { O.plugin.snap.active and "<cmd>Snap live_grep<cr>" or "<cmd>Telescope live_grep<cr>", "Text" }, +    t = { "<cmd>Telescope live_grep<cr>", "Text" },    },    S = {      name = "Session", @@ -251,17 +237,6 @@ local mappings = {    },  } -if O.plugin.spectre.active then -  mappings["r"] = { -    name = "Replace", -    f = { -      "<cmd>lua require('spectre').open_file_search()<cr>", -      "Current File", -    }, -    p = { "<cmd>lua require('spectre').open()<cr>", "Project" }, -  } -end -  -- if O.plugin.trouble.active then  --   mappings["d"] = {  --     name = "Diagnostics", @@ -274,8 +249,9 @@ end  --   }  -- end -if O.plugin.gitlinker.active then -  mappings["gy"] = "Gitlink" +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 @@ -295,7 +271,7 @@ if O.plugin.telescope_project.active then    -- open projects    vim.api.nvim_set_keymap(      "n", -    "<leader>p", +    "<leader>P",      ":lua require'telescope'.extensions.project.project{}<CR>",      { noremap = true, silent = true }    ) diff --git a/lua/plugins.lua b/lua/plugins.lua index 2b215291..69542b94 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -14,8 +14,6 @@ if not packer_ok then  end  packer.init { -  -- compile_path = vim.fn.stdpath('data')..'/site/pack/loader/start/packer.nvim/plugin/packer_compiled.vim', -  compile_path = require("packer.util").join_paths(vim.fn.stdpath "config", "plugin", "packer_compiled.vim"),    git = { clone_timeout = 300 },    display = {      open_fn = function() @@ -32,7 +30,7 @@ return require("packer").startup(function(use)    -- TODO refactor all of this (for now it works, but yes I know it could be wrapped in a simpler function)    use { "neovim/nvim-lspconfig" } -  use { "kabouzeid/nvim-lspinstall" } +  use { "kabouzeid/nvim-lspinstall", event = "BufRead" }    -- Telescope    use { "nvim-lua/popup.nvim" }    use { "nvim-lua/plenary.nvim" } @@ -40,17 +38,9 @@ return require("packer").startup(function(use)    use {      "nvim-telescope/telescope.nvim",      config = [[require('lv-telescope')]], -    cmd = "Telescope", +    event = "BufEnter",    } -  -- Snap TODO disable for now, need to only install fzy when user specifies they want to use snap -  -- use { -  -- "camspiers/snap", -  -- rocks = "fzy", -  -- config = function() -  --    require("lv-snap").config() -  -- end, -  -- disable = not O.plugin.snap.active -  -- } +    -- Autocomplete    use {      "hrsh7th/nvim-compe", @@ -67,7 +57,7 @@ return require("packer").startup(function(use)    use { "nvim-treesitter/nvim-treesitter", run = ":TSUpdate" }    -- Neoformat -  use { "sbdchd/neoformat", event = "BufEnter" } +  use { "sbdchd/neoformat" }    use {      "kyazdani42/nvim-tree.lua", @@ -93,7 +83,7 @@ return require("packer").startup(function(use)    use {      "windwp/nvim-autopairs",      event = "InsertEnter", -    after = { "telescope.nvim", "nvim-compe" }, +    after = { "telescope.nvim" },      config = function()        require "lv-autopairs"      end, @@ -127,34 +117,8 @@ return require("packer").startup(function(use)      -- event = "BufRead",    } -  -- use { -  --     "akinsho/nvim-bufferline.lua", -  --     config = function() require("lv-bufferline").config() end, -  --     event = "BufRead" -  -- } - -  -- Extras, these do not load by default +  -- Builtins, these do not load by default -  -- Better motions -  use { -    "phaazon/hop.nvim", -    event = "BufRead", -    config = function() -      require("lv-hop").config() -    end, -    disable = not O.plugin.hop.active, -    opt = true, -  } -  -- Enhanced increment/decrement -  use { -    "monaqa/dial.nvim", -    event = "BufRead", -    config = function() -      require("lv-dial").config() -    end, -    disable = not O.plugin.dial.active, -    opt = true, -  }    -- Dashboard    use {      "ChristianChiarulli/dashboard-nvim", @@ -176,25 +140,6 @@ return require("packer").startup(function(use)      end,      disable = not O.plugin.zen.active,    } -  -- Ranger -  use { -    "kevinhwang91/rnvimr", -    cmd = "Rnvimr", -    config = function() -      require("lv-rnvimr").config() -    end, -    disable = not O.plugin.ranger.active, -  } - -  -- matchup -  use { -    "andymass/vim-matchup", -    event = "CursorMoved", -    config = function() -      require("lv-matchup").config() -    end, -    disable = not O.plugin.matchup.active, -  }    use {      "norcalli/nvim-colorizer.lua", @@ -206,18 +151,6 @@ return require("packer").startup(function(use)      disable = not O.plugin.colorizer.active,    } -  use { -    "nacro90/numb.nvim", -    event = "BufRead", -    config = function() -      require("numb").setup { -        show_numbers = true, -- Enable 'number' for the window while peeking -        show_cursorline = true, -- Enable 'cursorline' for the window while peeking -      } -    end, -    disable = not O.plugin.numb.active, -  } -    -- Treesitter playground    use {      "nvim-treesitter/playground", @@ -264,6 +197,7 @@ return require("packer").startup(function(use)      cmd = "TroubleToggle",      disable = not O.plugin.trouble.active,    } +    -- Debugging    use {      "mfussenegger/nvim-dap", @@ -279,12 +213,7 @@ return require("packer").startup(function(use)      end,      disable = not O.plugin.debug.active,    } -  -- Better quickfix -  use { -    "kevinhwang91/nvim-bqf", -    event = "BufRead", -    disable = not O.plugin.bqf.active, -  } +    -- Floating terminal    use {      "numToStr/FTerm.nvim", @@ -297,133 +226,50 @@ return require("packer").startup(function(use)      end,      disable = not O.plugin.floatterm.active,    } -  -- Search & Replace -  use { -    "windwp/nvim-spectre", -    event = "BufRead", -    config = function() -      require("spectre").setup() -    end, -    disable = not O.plugin.spectre.active, -  } -  -- lsp root with this nvim-tree will follow you -  use { -    "ahmedkhalf/lsp-rooter.nvim", -    event = "BufRead", -    config = function() -      require("lsp-rooter").setup() -    end, -    disable = not O.plugin.lsp_rooter.active, -  } -  -- Markdown preview -  use { -    "iamcco/markdown-preview.nvim", -    run = "cd app && npm install", -    ft = "markdown", -    disable = not O.plugin.markdown_preview.active, -  } -  -- Interactive scratchpad -  use { -    "metakirby5/codi.vim", -    cmd = "Codi", -    disable = not O.plugin.codi.active, -  } +    -- Use fzy for telescope    use {      "nvim-telescope/telescope-fzy-native.nvim",      event = "BufRead",      disable = not O.plugin.telescope_fzy.active,    } +    -- Use project for telescope    use {      "nvim-telescope/telescope-project.nvim",      event = "BufRead", -    after = "telescope.nvim", +    setup = function () vim.cmd[[packadd telescope.nvim]] end,      disable = not O.plugin.telescope_project.active,    } +    -- Sane gx for netrw_gx bug    use {      "felipec/vim-sanegx",      event = "BufRead",      disable = not O.plugin.sanegx.active,    } -  -- Sane gx for netrw_gx bug -  use { -    "folke/todo-comments.nvim", -    event = "BufRead", -    disable = not O.plugin.todo_comments.active, -  } -  -- LSP Colors -  use { -    "folke/lsp-colors.nvim", -    event = "BufRead", -    disable = not O.plugin.lsp_colors.active, -  } -  -- Git Blame -  use { -    "f-person/git-blame.nvim", -    event = "BufRead", -    disable = not O.plugin.git_blame.active, -  } -  use { -    "ruifm/gitlinker.nvim", -    event = "BufRead", -    config = function() -      require("gitlinker").setup { -        opts = { -          -- remote = 'github', -- force the use of a specific remote -          -- adds current line nr in the url for normal mode -          add_current_line_on_normal_mode = true, -          -- callback for what to do with the url -          action_callback = require("gitlinker.actions").open_in_browser, -          -- print the url after performing the action -          print_url = false, -          -- mapping to call url generation -          mappings = "<leader>gy", -        }, -      } -    end, -    disable = not O.plugin.gitlinker.active, -    requires = "nvim-lua/plenary.nvim", -  } +    -- Lazygit    use {      "kdheepak/lazygit.nvim",      cmd = "LazyGit",      disable = not O.plugin.lazygit.active,    } -  -- Octo -  use { -    "pwntester/octo.nvim", -    event = "BufRead", -    disable = not O.plugin.octo.active, -  } +    -- Diffview    use {      "sindrets/diffview.nvim",      event = "BufRead",      disable = not O.plugin.diffview.active,    } -  -- Easily Create Gists -  use { -    "mattn/vim-gist", -    event = "BufRead", -    disable = not O.plugin.gist.active, -    requires = "mattn/webapi-vim", -  } +    -- Lush Create Color Schemes    use {      "rktjmp/lush.nvim",      -- cmd = {"LushRunQuickstart", "LushRunTutorial", "Lushify"},      disable = not O.plugin.lush.active,    } -  -- HTML preview -  use { -    "turbio/bracey.vim", -    event = "BufRead", -    run = "npm install --prefix server", -    disable = not O.plugin.bracey.active, -  } +    -- Debugger management    use {      "Pocco81/DAPInstall.nvim", @@ -432,8 +278,13 @@ return require("packer").startup(function(use)    }    -- LANGUAGE SPECIFIC GOES HERE - -  use { "lervag/vimtex", ft = "tex" } +  use { +    "lervag/vimtex", +    ft = "tex", +    config = function() +      require "lv-vimtex" +    end, +  }    -- Rust tools    -- TODO: use lazy loading maybe? @@ -472,13 +323,38 @@ return require("packer").startup(function(use)    --   end,    -- } -  -- Tabnine +  -- Pretty parentheses +  use { +    "p00f/nvim-ts-rainbow", +    disable = not O.plugin.ts_rainbow.active, +  } + +  -- Autotags <div>|</div>    use { -    "tzachar/compe-tabnine", -    run = "./install.sh", -    requires = "hrsh7th/nvim-compe", -    disable = not O.plugin.tabnine.active, +    "windwp/nvim-ts-autotag", +    event = "InsertEnter", +    disable = not O.plugin.ts_autotag.active,    } + +  -- Custom semantic text objects +  use { +    "nvim-treesitter/nvim-treesitter-textobjects", +    disable = not O.plugin.ts_textobjects.active, +  } + +  -- Smart text objects +  use { +    "RRethy/nvim-treesitter-textsubjects", +    disable = not O.plugin.ts_textsubjects.active, +  } + +  -- Text objects using hint labels +  use { +    "mfussenegger/nvim-ts-hint-textobject", +    event = "BufRead", +    disable = not O.plugin.ts_hintobjects.active, +  } +    for _, plugin in pairs(O.custom_plugins) do      packer.use(plugin)    end | 
