diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index af7701b4..255497d6 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,4 +1,5 @@ # These are supported funding model platforms +github: christianchiarulli patreon: chrisatmachine diff --git a/.github/ISSUE_TEMPLATE/feature-form.yaml b/.github/ISSUE_TEMPLATE/feature-form.yaml new file mode 100644 index 00000000..cfd0793b --- /dev/null +++ b/.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 diff --git a/README.md b/README.md index 86113e02..90314c58 100644 --- a/README.md +++ b/README.md @@ -4,19 +4,20 @@ Latest release - - Total downloads - Last commit + + License Patreon donate button follow on Twitter -

+

+ ## 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 +======= +
+ +[![Lua](https://img.shields.io/badge/Made%20with%20Lua-blue.svg?style=for-the-badge&logo=lua)]() + + +
+>>>>>>> 68bfac0468ea4d5d7faf5bede0a4ab8cb5572f0c diff --git a/ftplugin/cs.lua b/ftplugin/cs.lua new file mode 100644 index 00000000..7fdbbc66 --- /dev/null +++ b/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()) }, +} diff --git a/ftplugin/vue.lua b/ftplugin/vue.lua index 6787d12f..ff44d761 100644 --- a/ftplugin/vue.lua +++ b/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"), } diff --git a/init.lua b/init.lua index 2b5a9515..95ef162a 100644 --- a/init.lua +++ b/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 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 = "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", "", ":resize -2", { silent = true }) -vim.api.nvim_set_keymap("n", "", ":resize +2", { silent = true }) -vim.api.nvim_set_keymap("n", "", ":vertical resize -2", { silent = true }) -vim.api.nvim_set_keymap("n", "", ":vertical resize +2", { silent = true }) +if vim.fn.has("mac") == 1 then + vim.api.nvim_set_keymap("n", "", ":resize -2", { silent = true }) + vim.api.nvim_set_keymap("n", "", ":resize +2", { silent = true }) + vim.api.nvim_set_keymap("n", "", ":vertical resize -2", { silent = true }) + vim.api.nvim_set_keymap("n", "", ":vertical resize +2", { silent = true }) +else + vim.api.nvim_set_keymap("n", "", ":resize -2", { silent = true }) + vim.api.nvim_set_keymap("n", "", ":resize +2", { silent = true }) + vim.api.nvim_set_keymap("n", "", ":vertical resize -2", { silent = true }) + vim.api.nvim_set_keymap("n", "", ":vertical resize +2", { silent = true }) +end -- better indenting vim.api.nvim_set_keymap("v", "<", " (dial-increment) -nmap (dial-decrement) -vmap (dial-increment) -vmap (dial-decrement) -vmap g (dial-increment-additional) -vmap g (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", { silent = true }) - vim.api.nvim_set_keymap("n", "S", ":HopWord", { 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", { 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 = "lua require('spectre').toggle_line()", - desc = "toggle current item", - }, - ["enter_file"] = { - map = "", - cmd = "lua require('spectre.actions').select_entry()", - desc = "goto current file", - }, - ["send_to_qf"] = { - map = "q", - cmd = "lua require('spectre.actions').send_to_qf()", - desc = "send all item to quickfix", - }, - ["replace_cmd"] = { - map = "c", - cmd = "lua require('spectre.actions').replace_cmd()", - desc = "input replace vim command", - }, - ["show_option_menu"] = { - map = "o", - cmd = "lua require('spectre').show_options()", - desc = "show option", - }, - ["run_replace"] = { - map = "R", - cmd = "lua require('spectre.actions').run_replace()", - desc = "replace all", - }, - ["change_view_mode"] = { - map = "v", - cmd = "lua require('spectre').change_view()", - desc = "change result view mode", - }, - ["toggle_ignore_case"] = { - map = "ti", - cmd = "lua require('spectre').change_options('ignore-case')", - desc = "toggle ignore case", - }, - ["toggle_ignore_hidden"] = { - map = "th", - cmd = "lua require('spectre').change_options('hidden')", - 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", -- {noremap = true, silent = true}) --- telescope or snap -if O.plugin.snap.active then - vim.api.nvim_set_keymap("n", "f", ":Snap find_files", { noremap = true, silent = true }) -else - vim.api.nvim_set_keymap("n", "f", ":Telescope find_files", { noremap = true, silent = true }) -end +vim.api.nvim_set_keymap("n", "f", ":Telescope find_files", { noremap = true, silent = true }) -- dashboard vim.api.nvim_set_keymap("n", ";", ":Dashboard", { noremap = true, silent = true }) @@ -101,7 +96,7 @@ local mappings = { b = { name = "Buffers", j = { "BufferPick", "jump to buffer" }, - f = { O.plugin.snap.active and "Snap buffers" or "Telescope buffers", "Find buffer" }, + f = { "Telescope buffers", "Find buffer" }, w = { "BufferWipeout", "wipeout buffer" }, e = { "BufferCloseAllButCurrent", @@ -224,21 +219,12 @@ local mappings = { name = "Search", b = { "Telescope git_branches", "Checkout branch" }, c = { "Telescope colorscheme", "Colorscheme" }, - -- d = { - -- "Telescope lsp_document_diagnostics", - -- "Document Diagnostics" - -- }, - -- D = { - -- "Telescope lsp_workspace_diagnostics", - -- "Workspace Diagnostics" - -- }, - f = { O.plugin.snap.active and "Snap find_files" or "Telescope find_files", "Find File" }, + f = { "Telescope find_files", "Find File" }, h = { "Telescope help_tags", "Find Help" }, - -- m = {"Telescope marks", "Marks"}, M = { "Telescope man_pages", "Man Pages" }, - r = { O.plugin.snap.active and "Snap oldfiles" or "Telescope oldfiles", "Open Recent File" }, + r = { "Telescope oldfiles", "Open Recent File" }, R = { "Telescope registers", "Registers" }, - t = { O.plugin.snap.active and "Snap live_grep" or "Telescope live_grep", "Text" }, + t = { "Telescope live_grep", "Text" }, }, S = { name = "Session", @@ -251,17 +237,6 @@ local mappings = { }, } -if O.plugin.spectre.active then - mappings["r"] = { - name = "Replace", - f = { - "lua require('spectre').open_file_search()", - "Current File", - }, - p = { "lua require('spectre').open()", "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", "o", ":SymbolsOutline", { 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", - "p", + "P", ":lua require'telescope'.extensions.project.project{}", { 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" - -- } + -- Builtins, these do not load by default - -- Extras, 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 = "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 { - "tzachar/compe-tabnine", - run = "./install.sh", - requires = "hrsh7th/nvim-compe", - disable = not O.plugin.tabnine.active, + "p00f/nvim-ts-rainbow", + disable = not O.plugin.ts_rainbow.active, } + + -- Autotags
|
+ use { + "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 diff --git a/utils/installer/lv-config.example.lua b/utils/installer/lv-config.example.lua index 71d9dfc8..f0aceb55 100644 --- a/utils/installer/lv-config.example.lua +++ b/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\""}}