diff --git a/lua/config/remap.lua b/lua/config/remap.lua index 12ce699..2af866f 100644 --- a/lua/config/remap.lua +++ b/lua/config/remap.lua @@ -91,4 +91,4 @@ nmap("qk", "cprev", { desc = "Previous quickfix item" }) nmap("", "nohlsearch", { desc = "Clear search highlights" }) -- Launch lazygit in a new tmux pane, exits when done -nmap("lg", "!tmux new-window -c " .. vim.fn.getcwd() .. " -- lazygit ", { desc = "Git Go" }) +nmap("lg", "!tmux new-window -c " .. vim.fn.getcwd() .. " -- lazygit ", { desc = "LazyGit" }) diff --git a/lua/globals/map.lua b/lua/globals/map.lua index 5432beb..f3197c3 100644 --- a/lua/globals/map.lua +++ b/lua/globals/map.lua @@ -15,163 +15,3 @@ end _G.vmap = function(keys, func, opts) _G.map("v", keys, func, opts) end - -_G.icons = { - kind = { - Array = " ", - Boolean = " ", - Class = " ", - Color = " ", - Constant = " ", - Constructor = " ", - Enum = " ", - EnumMember = " ", - Event = " ", - Field = " ", - File = " ", - Folder = "󰉋 ", - Function = " ", - Interface = " ", - Key = " ", - Keyword = " ", - Method = " ", - -- Module = " ", - Module = " ", - Namespace = " ", - Null = "󰟢 ", - Number = " ", - Object = " ", - Operator = " ", - Package = " ", - Property = " ", - Reference = " ", - Snippet = " ", - String = " ", - Struct = " ", - Text = " ", - TypeParameter = " ", - Unit = " ", - Value = " ", - Variable = " ", - }, - git = { - LineAdded = " ", - LineModified = " ", - LineRemoved = " ", - FileDeleted = " ", - FileIgnored = "◌", - FileRenamed = " ", - FileStaged = "S", - FileUnmerged = "", - FileUnstaged = "", - FileUntracked = "U", - Diff = " ", - Repo = " ", - Octoface = " ", - Copilot = " ", - Branch = "", - }, - ui = { - Message = "󰍡 ", - ArrowCircleDown = "", - ArrowCircleLeft = "", - ArrowCircleRight = "", - ArrowCircleUp = "", - BoldArrowDown = "", - BoldArrowLeft = "", - BoldArrowRight = "", - BoldArrowUp = "", - BoldClose = "", - BoldDividerLeft = "", - BoldDividerRight = "", - BoldLineLeft = "▎", - BoldLineMiddle = "┃", - BoldLineDashedMiddle = "┋", - BookMark = "", - BoxChecked = " ", - Bug = " ", - Stacks = "", - Scopes = "", - Watches = "󰂥", - DebugConsole = " ", - Calendar = " ", - Check = "", - ChevronRight = "", - ChevronShortDown = "", - ChevronShortLeft = "", - ChevronShortRight = "", - ChevronShortUp = "", - Circle = " ", - Close = "󰅖", - CloudDownload = " ", - Code = "", - Comment = "", - Dashboard = "", - DividerLeft = "", - DividerRight = "", - DoubleChevronRight = "»", - Ellipsis = "", - EmptyFolder = " ", - EmptyFolderOpen = " ", - File = " ", - FileSymlink = "", - Files = " ", - FindFile = "󰈞", - FindText = "󰊄", - Fire = "", - Folder = "󰉋 ", - FolderOpen = " ", - FolderSymlink = " ", - Forward = " ", - Gear = " ", - History = " ", - Lightbulb = " ", - LineLeft = "▏", - LineMiddle = "│", - List = " ", - Lock = " ", - NewFile = " ", - Note = " ", - Package = " ", - Pencil = "󰏫 ", - Plus = " ", - Project = " ", - Search = " ", - SignIn = " ", - SignOut = " ", - Tab = "󰌒 ", - Table = " ", - Target = "󰀘 ", - Telescope = "🔭", - Text = " ", - Tree = "", - Triangle = "󰐊", - TriangleShortArrowDown = "", - TriangleShortArrowLeft = "", - TriangleShortArrowRight = "", - TriangleShortArrowUp = "", - }, - diagnostics = { - BoldError = "", - Error = "", - BoldWarning = "", - Warning = "", - BoldInformation = "", - Information = "", - BoldQuestion = "", - Question = "", - BoldHint = "", - Hint = "󰌶", - Debug = "", - Trace = "✎", - }, - misc = { - Robot = "󰚩 ", - Squirrel = " ", - Tag = " ", - Watch = "", - Smiley = " ", - Package = " ", - CircuitBoard = " ", - }, -} diff --git a/lua/plugins/chezmoi.lua b/lua/plugins/chezmoi.lua index 0a09175..aa7f642 100644 --- a/lua/plugins/chezmoi.lua +++ b/lua/plugins/chezmoi.lua @@ -5,7 +5,6 @@ return { init = function() -- This option is required. vim.g["chezmoi#use_tmp_buffer"] = true - -- add other options here if needed. end, }, { diff --git a/lua/plugins/comments.lua b/lua/plugins/comments.lua index b4317fb..66c126f 100644 --- a/lua/plugins/comments.lua +++ b/lua/plugins/comments.lua @@ -5,34 +5,35 @@ local M = { "JoosepAlviste/nvim-ts-context-commentstring", event = "VeryLazy", }, + config = function() + vim.g.skip_ts_context_commentstring_module = true + require("ts_context_commentstring").setup({ + enable_autocmd = false, + }) + + require("Comment").setup({ + pre_hook = require("ts_context_commentstring.integrations.comment_nvim").create_pre_hook(), + opleader = { + line = "gc", + block = "gC", + }, + mappings = { + basic = true, + }, + }) + end, + }, + { + "folke/todo-comments.nvim", + config = function() + require("todo-comments").setup({ + keywords = { + FUCK = { icon = "󰇷 ", color = "error" }, + SHITTY = { icon = "󰇷 ", color = "error" }, + }, + }) + end, }, - { "folke/todo-comments.nvim" }, } -M.config = function() - vim.g.skip_ts_context_commentstring_module = true - - require("ts_context_commentstring").setup({ - enable_autocmd = false, - }) - - require("Comment").setup({ - pre_hook = require("ts_context_commentstring.integrations.comment_nvim").create_pre_hook(), - opleader = { - line = "gc", - block = "gC", - }, - mappings = { - basic = true, - }, - }) - - require("todo-comments").setup({ - keywords = { - FUCK = { icon = "󰇷 ", color = "error" }, - SHITTY = { icon = "󰇷 ", color = "error" }, - }, - }) -end - return M diff --git a/lua/plugins/git.lua b/lua/plugins/git.lua index f1a4d30..2eb27d1 100644 --- a/lua/plugins/git.lua +++ b/lua/plugins/git.lua @@ -1,30 +1,31 @@ local M = { - { "lewis6991/gitsigns.nvim" }, + { + "lewis6991/gitsigns.nvim", + config = function() + require("gitsigns").setup({ + current_line_blame_formatter = ", - ", + current_line_blame = true, + signs = { + add = { text = icons.ui.BoldLineMiddle }, + change = { text = icons.ui.BoldLineDashedMiddle }, + delete = { text = icons.ui.TriangleShortArrowRight }, + topdelete = { text = icons.ui.TriangleShortArrowRight }, + changedelete = { text = icons.ui.BoldLineMiddle }, + }, + }) + end, + }, { "ruifm/gitlinker.nvim", + config = function() + require("gitlinker").setup({ + message = false, + console_log = false, + }) + + nmap("gy", "lua require('gitlinker').get_buf_range_url('n')") + end, }, } -M.config = function() - require("gitsigns").setup({ - current_line_blame_formatter = ", - ", - current_line_blame = true, - signs = { - add = { text = icons.ui.BoldLineMiddle }, - change = { text = icons.ui.BoldLineDashedMiddle }, - delete = { text = icons.ui.TriangleShortArrowRight }, - topdelete = { text = icons.ui.TriangleShortArrowRight }, - changedelete = { text = icons.ui.BoldLineMiddle }, - }, - }) - - require("gitlinker").setup({ - message = false, - console_log = false, - }) - - nmap("gy", "lua require('gitlinker').get_buf_range_url('n')") - namp("gY", "lua require('gitlinker').get_buf_range_url('n', 'blame')") -end - return M diff --git a/lua/plugins/harpoon.lua b/lua/plugins/harpoon.lua index 532ac64..4719f92 100644 --- a/lua/plugins/harpoon.lua +++ b/lua/plugins/harpoon.lua @@ -1,7 +1,6 @@ local M = { "ThePrimeagen/harpoon", branch = "harpoon2", - dependencies = { "nvim-lua/plenary.nvim", }, diff --git a/lua/plugins/lastplace.lua b/lua/plugins/lastplace.lua index 0ca0acc..2e409b9 100644 --- a/lua/plugins/lastplace.lua +++ b/lua/plugins/lastplace.lua @@ -1,3 +1,11 @@ local M = { "ethanholz/nvim-lastplace" } +M.config = function() + require("nvim-lastplace").setup({ + lastplace_ignore_buftype = { "quickfix", "nofile", "help" }, + lastplace_ignore_filetype = { "gitcommit", "gitrebase", "svn", "hgcommit" }, + lastplace_open_folds = true, + }) +end + return M diff --git a/lua/plugins/lsp/init.lua b/lua/plugins/lsp/init.lua index f148b9d..c32ec22 100644 --- a/lua/plugins/lsp/init.lua +++ b/lua/plugins/lsp/init.lua @@ -130,7 +130,7 @@ function M.config() } -- Load server-specific configuration if it exists - local ok, server_opts = pcall(require, "plugins.lsp.servers." .. server_name) + local ok, server_opts = pcall(require, "config.lsp." .. server_name) if ok then base_opts = vim.tbl_deep_extend("force", base_opts, server_opts) end diff --git a/lua/plugins/lsp/servers/gopls.lua b/lua/plugins/lsp/servers/gopls.lua deleted file mode 100644 index 9af8045..0000000 --- a/lua/plugins/lsp/servers/gopls.lua +++ /dev/null @@ -1,15 +0,0 @@ -return { - settings = { - gopls = { - gofumpt = true, -- https://github.com/mvdan/gofumpt a stricter gofmt - completeUnimported = true, - usePlaceholders = true, - analyses = { - unusedparams = true, - }, - }, - }, - flags = { - debounce_text_changes = 150, -- https://github.com/golang/tools/blob/master/gopls/doc/settings.md#change-detection - }, -} diff --git a/lua/plugins/lsp/servers/html.lua b/lua/plugins/lsp/servers/html.lua deleted file mode 100644 index c4f1ba2..0000000 --- a/lua/plugins/lsp/servers/html.lua +++ /dev/null @@ -1,3 +0,0 @@ -return { - filetypes = { "html", "templ" }, -} diff --git a/lua/plugins/lsp/servers/htmx.lua b/lua/plugins/lsp/servers/htmx.lua deleted file mode 100644 index c4f1ba2..0000000 --- a/lua/plugins/lsp/servers/htmx.lua +++ /dev/null @@ -1,3 +0,0 @@ -return { - filetypes = { "html", "templ" }, -} diff --git a/lua/plugins/lsp/servers/jsonls.lua b/lua/plugins/lsp/servers/jsonls.lua deleted file mode 100644 index 5a685df..0000000 --- a/lua/plugins/lsp/servers/jsonls.lua +++ /dev/null @@ -1,16 +0,0 @@ -return { - settings = { - json = { - schemas = require("schemastore").json.schemas(), - }, - }, - setup = { - commands = { - Format = { - function() - vim.lsp.buf.range_formatting({}, { 0, 0 }, { vim.fn.line("$"), 0 }) - end, - }, - }, - }, -} diff --git a/lua/plugins/lsp/servers/lua_ls.lua b/lua/plugins/lsp/servers/lua_ls.lua deleted file mode 100644 index 45d8e6a..0000000 --- a/lua/plugins/lsp/servers/lua_ls.lua +++ /dev/null @@ -1,21 +0,0 @@ -return { - settings = { - Lua = { - format = { - enable = false, - }, - hint = { - enable = false, - arrayIndex = "Disable", -- "Enable" | "Auto" | "Disable" - await = true, - paramName = "Disable", -- "All" | "Literal" | "Disable" - paramType = true, - semicolon = "All", -- "All" | "SameLine" | "Disable" - setType = false, - }, - telemetry = { - enable = false, - }, - }, - }, -} diff --git a/lua/plugins/lsp/servers/omnisharp.lua b/lua/plugins/lsp/servers/omnisharp.lua deleted file mode 100644 index 1362553..0000000 --- a/lua/plugins/lsp/servers/omnisharp.lua +++ /dev/null @@ -1,7 +0,0 @@ -return { - settings = { - enable_roslyn_analyzers = true, - organize_imports_on_format = true, - enable_import_completion = true, - }, -} diff --git a/lua/plugins/lsp/servers/yamlls.lua b/lua/plugins/lsp/servers/yamlls.lua deleted file mode 100644 index 47b8d97..0000000 --- a/lua/plugins/lsp/servers/yamlls.lua +++ /dev/null @@ -1,21 +0,0 @@ -return { - settings = { - yaml = { - schemaStore = { - -- You must disable built-in schemaStore support if you want to use - -- this plugin and its advanced options like `ignore`. - enable = false, - -- Avoid TypeError: Cannot read properties of undefined (reading 'length') - url = "", - }, - schemas = require("schemastore").yaml.schemas({ - -- additional schemas (not in the catalog) - extra = { - url = "https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/argoproj.io/application_v1alpha1.json", - name = "Argo CD Application", - fileMatch = "argocd-application.yaml", - }, - }), - }, - }, -} diff --git a/lua/plugins/mini.lua b/lua/plugins/mini.lua index 899c732..9b61b45 100644 --- a/lua/plugins/mini.lua +++ b/lua/plugins/mini.lua @@ -1,5 +1,4 @@ local M = { - { "echasnovski/mini.icons", init = function() diff --git a/lua/plugins/ui/alpha.lua b/lua/plugins/ui/alpha.lua index 8ad7b1e..657a793 100644 --- a/lua/plugins/ui/alpha.lua +++ b/lua/plugins/ui/alpha.lua @@ -4,10 +4,12 @@ local M = { M.config = function() local startify = require("alpha.themes.startify") + startify.section.bottom_buttons.val = { startify.button("e", "New file", "ene "), startify.button("q", "Quit", "q "), } + require("alpha").setup(startify.config) end