Selaa lähdekoodia

cleanup and stability improvements

christianchiarulli 4 vuotta sitten
vanhempi
commit
f22e1bd8cb

+ 1 - 0
.github/FUNDING.yml

@@ -1,4 +1,5 @@
 # These are supported funding model platforms
 
+github: christianchiarulli
 patreon: chrisatmachine
 

+ 34 - 0
.github/ISSUE_TEMPLATE/feature-form.yaml

@@ -0,0 +1,34 @@
+name: Feature Request
+description: Suggest an idea for improving this project
+title: "[Feature]: "
+labels: [enhancement]
+# assignees:
+#   - ChristianChiarulli 
+body:
+  - type: markdown
+    attributes:
+      value: |
+        Thank you for helping us improve !
+  - type: textarea
+    id: motivation
+    attributes:
+      label: Feature motivation
+      description: A clear and concise description of the problem or missing capability
+      placeholder: |
+        I am always frustrated when ...
+    validations:
+      required: true
+  - type: textarea
+    id: solution
+    attributes:
+      label: Describe the expected solution
+  - type: textarea
+    id: alternatives
+    attributes:
+      label: Describe the alternatives you've considered
+      description: Let us know about other solutions you've tried or researched
+  - type: textarea
+    id: additional-context
+    attributes:
+      label: Additional context
+      description: If applicable, add screenshots or link related issues

+ 14 - 4
README.md

@@ -4,19 +4,20 @@
     <a href="https://github.com/ChristianChiarulli/LunarVim/releases/latest">
       <img alt="Latest release" src="https://img.shields.io/github/v/release/ChristianChiarulli/LunarVim" />
     </a>
-    <a href="https://github.com/ChristianChiarulli/sniprun/releases">
-      <img alt="Total downloads" src="https://img.shields.io/github/downloads/ChristianChiarulli/LunarVim/total" />
-    </a>
     <a href="https://github.com/ChristianChiarulli/LunarVim/pulse">
       <img alt="Last commit" src="https://img.shields.io/github/last-commit/ChristianChiarulli/LunarVim"/>
     </a>
+    <a href="https://github.com/ChristianChiarulli/LunarVim/blob/main/LICENSE">
+      <img src="https://img.shields.io/github/license/siduck76/NvChad?style=flat-square&logo=GNU&label=License" alt="License"
+    />
     <a href="https://patreon.com/chrisatmachine" title="Donate to this project using Patreon">
       <img src="https://img.shields.io/badge/patreon-donate-yellow.svg" alt="Patreon donate button" />
     </a>
     <a href="https://twitter.com/intent/follow?screen_name=chrisatmachine">
       <img src="https://img.shields.io/twitter/follow/chrisatmachine?style=social&logo=twitter" alt="follow on Twitter">
     </a>
-</p>
+</p>	
+
 </div>
 
 ## Install In One Command!
@@ -115,4 +116,13 @@ cd ~/.config/nvim && git pull
 > "I have the processing power of a potato with 4 gb of ram and LunarVim runs perfectly."
 > - @juanCortelezzi, LunarVim user.
 
+<<<<<<< HEAD
 
+=======
+<div align="center">
+	
+[![Lua](https://img.shields.io/badge/Made%20with%20Lua-blue.svg?style=for-the-badge&logo=lua)]()
+	
+	
+</div>
+>>>>>>> 68bfac0468ea4d5d7faf5bede0a4ab8cb5572f0c

+ 6 - 0
ftplugin/cs.lua

@@ -0,0 +1,6 @@
+-- C# language server (csharp/OmniSharp) setup
+require("lspconfig").omnisharp.setup{
+  on_attach = require("lsp").common_on_attach,
+  root_dir = require("lspconfig").util.root_pattern(".sln",".git"),
+  cmd = { DATA_PATH .. "/lspinstall/csharp/omnisharp/run", "--languageserver", "--hostPID", tostring(vim.fn.getpid()) },
+}

+ 2 - 1
ftplugin/vue.lua

@@ -1,5 +1,6 @@
+-- Vue language server configuration (vetur)
 require("lspconfig").vuels.setup {
   cmd = { DATA_PATH .. "/lspinstall/vue/node_modules/.bin/vls", "--stdio" },
   on_attach = require("lsp").common_on_attach,
-  root_dir = require("lspconfig").util.root_pattern(".git", "."),
+  root_dir = require("lspconfig").util.root_pattern(".git", "vue.config.js", "package.json", "yarn.lock"),
 }

+ 3 - 0
init.lua

@@ -11,6 +11,9 @@ require "lsp"
 if O.lang.emmet.active then
   require "lsp.emmet-ls"
 end
+if O.lang.tailwindcss.active then
+  require "lsp.tailwindcss-ls"
+end
 
 -- autoformat
 if O.format_on_save then

+ 49 - 48
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" },
   },
-}
+}

+ 11 - 4
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 })

+ 2 - 0
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
 }

+ 0 - 73
lua/lv-bufferline/init.lua

@@ -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

+ 1 - 5
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)

+ 0 - 30
lua/lv-dial/init.lua

@@ -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

+ 12 - 48
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

+ 0 - 2
lua/lv-gitblame/init.lua

@@ -1,2 +0,0 @@
-vim.cmd "highlight default link gitblame SpecialComment"
-vim.g.gitblame_enabled = 0

+ 0 - 9
lua/lv-hop/init.lua

@@ -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

+ 0 - 5
lua/lv-lsp-rooter/init.lua

@@ -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
-}

+ 0 - 7
lua/lv-matchup/init.lua

@@ -1,7 +0,0 @@
-local M = {}
-
-M.config = function()
-  vim.g.matchup_matchparen_offscreen = { method = "popup" }
-end
-
-return M

+ 0 - 4
lua/lv-quickscope/init.lua

@@ -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

+ 0 - 6
lua/lv-rnvimr/init.lua

@@ -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 })

+ 0 - 14
lua/lv-snap/init.lua

@@ -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

+ 0 - 50
lua/lv-spectre/init.lua

@@ -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
-  },
-}

+ 109 - 6
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
+  },
 }

+ 5 - 0
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

+ 9 - 33
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 }
   )

+ 53 - 177
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

+ 6 - 5
utils/installer/lv-config.example.lua

@@ -22,15 +22,10 @@ O.transparent_window = false
 
 -- TODO User Config for predefined plugins
 -- After changing plugin config exit and reopen LunarVim, Run :PackerInstall :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
@@ -65,6 +60,12 @@ O.lang.php.environment.php_version = "7.4"
 O.lang.php.diagnostics.signs = true
 O.lang.php.diagnostics.underline = true
 O.lang.php.filetypes = {"php", "phtml"}
+O.lang.php.format = {
+  format = {
+    default = "psr12"
+  }
+}
+
 
 -- Autocommands (https://neovim.io/doc/user/autocmd.html)
 -- O.user_autocommands = {{ "BufWinEnter", "*", "echo \"hi again\""}}