From 9400b59cd2e2486e222064ccc8061d9b4950677f Mon Sep 17 00:00:00 2001 From: Tovi Jaeschke-Rogers Date: Mon, 5 Jan 2026 12:33:14 +1030 Subject: [PATCH] feat: add conform and blink back to nvim config --- .config/alacritty/alacritty.toml | 2 +- .config/lazysql/config.toml | 10 + .config/lazysql/history/local.json | 10 + .config/nvim/lua/plugins/blink_cmp.lua | 133 ++ .config/nvim/lua/plugins/conform_nvim.lua | 56 + .../{diffview.lua => diffview_nvim.lua} | 0 .../{gitsigns.lua => gitsigns_nvim.lua} | 0 .config/nvim/lua/plugins/harpoon.lua | 1 - .config/nvim/lua/plugins/lspconfig.lua | 37 +- .../lua/plugins/{oil.lua => oil_nvim.lua} | 0 .../lua/plugins/treesitter-textobjects.lua | 12 +- .config/nvim/lua/plugins/treesitter.lua | 5 +- .config/nvim/nvim-pack-lock.json | 16 + .../themes/catppuccin_cyberdream_tmux.conf | 2035 ----------------- 14 files changed, 243 insertions(+), 2074 deletions(-) create mode 100644 .config/lazysql/config.toml create mode 100644 .config/lazysql/history/local.json create mode 100644 .config/nvim/lua/plugins/blink_cmp.lua create mode 100644 .config/nvim/lua/plugins/conform_nvim.lua rename .config/nvim/lua/plugins/{diffview.lua => diffview_nvim.lua} (100%) rename .config/nvim/lua/plugins/{gitsigns.lua => gitsigns_nvim.lua} (100%) rename .config/nvim/lua/plugins/{oil.lua => oil_nvim.lua} (100%) delete mode 100644 .config/tmux/plugins/catppuccin/tmux/themes/catppuccin_cyberdream_tmux.conf diff --git a/.config/alacritty/alacritty.toml b/.config/alacritty/alacritty.toml index 01500a1..8f1da3d 100644 --- a/.config/alacritty/alacritty.toml +++ b/.config/alacritty/alacritty.toml @@ -1,5 +1,5 @@ [general] -import = ["~/.config/alacritty/kanagawa.toml"] +import = ["~/.config/alacritty/kanagawa_wave.toml"] [window] opacity = 1 diff --git a/.config/lazysql/config.toml b/.config/lazysql/config.toml new file mode 100644 index 0000000..560f53e --- /dev/null +++ b/.config/lazysql/config.toml @@ -0,0 +1,10 @@ +[[database]] +Name = 'Local' +Provider = 'mysql' +DBName = 'jack' +URL = 'mysql://jack:secret@localhost:33061/jack' + +[application] +DefaultPageSize = 300 +DisableSidebar = true +SidebarOverlay = false diff --git a/.config/lazysql/history/local.json b/.config/lazysql/history/local.json new file mode 100644 index 0000000..f8b0348 --- /dev/null +++ b/.config/lazysql/history/local.json @@ -0,0 +1,10 @@ +[ + { + "QueryText": "SELECT * FROM `jack`.`users` WHERE true = true LIMIT 0, 300", + "Timestamp": "2026-01-02T01:28:34.964780276Z" + }, + { + "QueryText": "SELECT * FROM `jack`.`users` WHERE id = 1 LIMIT 0, 300", + "Timestamp": "2026-01-02T01:27:13.955906205Z" + } +] \ No newline at end of file diff --git a/.config/nvim/lua/plugins/blink_cmp.lua b/.config/nvim/lua/plugins/blink_cmp.lua new file mode 100644 index 0000000..4a98537 --- /dev/null +++ b/.config/nvim/lua/plugins/blink_cmp.lua @@ -0,0 +1,133 @@ +local M = {} + +M.install = { src = "https://github.com/saghen/blink.cmp" } + +M.dependencies = { + { src = "https://github.com/rafamadriz/friendly-snippets" }, +} + +M.setup = function() + require("blink.cmp").setup({ + completion = { + accept = { + auto_brackets = { + enabled = true, + }, + }, + menu = { + auto_show = true, + winblend = vim.o.pumblend, + scrollbar = true, + border = 'rounded', + winhighlight = 'Normal:NormalFloat,FloatBorder:FloatBorder,CursorLine:PmenuSel,Search:None', + draw = { + padding = 1, + gap = 1, + columns = { + { "kind_icon" }, + { "label", "label_description", gap = 1 }, + { "kind" } + }, + components = { + kind_icon = { + ellipsis = false, + text = function(ctx) + return ctx.kind_icon .. " " + end, + highlight = function(ctx) + return 'BlinkCmpKind' .. ctx.kind + end, + }, + kind = { + text = function(ctx) + return "(" .. ctx.kind .. ")" + end, + highlight = "Comment", + }, + label = { + width = { fill = true, max = 60 }, + text = function(ctx) + return ctx.label + end, + highlight = function(ctx) + return ctx.deprecated and "BlinkCmpLabelDeprecated" or "BlinkCmpLabel" + end, + }, + }, + treesitter = { "lsp" } + } + }, + + documentation = { + auto_show = true, + auto_show_delay_ms = 200, + update_delay_ms = 50, + window = { + border = 'rounded', + winblend = vim.o.pumblend, + winhighlight = 'Normal:NormalFloat,FloatBorder:FloatBorder', + max_width = 80, + max_height = 20, + } + }, + + ghost_text = { + enabled = vim.g.ai_cmp or false, + }, + }, + + appearance = { + use_nvim_cmp_as_default = true, + nerd_font_variant = 'mono' + }, + sources = { + default = { + 'lsp', + 'path', + 'snippets', + 'buffer', + }, + + providers = { + lsp = { + name = "LSP", + module = "blink.cmp.sources.lsp", + score_offset = 90, + }, + path = { + name = "Path", + module = "blink.cmp.sources.path", + score_offset = 3, + opts = { + trailing_slash = false, + label_trailing_slash = true, + get_cwd = function (context) return vim.fn.getcwd() end, + show_hidden_files_by_default = true, + } + }, + snippets = { + name = "Snippets", + module = "blink.cmp.sources.snippets", + score_offset = 85, + opts = { + friendly_snippets = true, + search_paths = { vim.fn.stdpath("config") .. "/snippets" }, + global_snippets = { "all" }, + extended_filetypes = {}, + ignored_filetypes = {}, + } + }, + buffer = { + name = "Buffer", + module = "blink.cmp.sources.buffer", + }, + cmdline = { + name = "Cmdline", + module = "blink.cmp.sources.cmdline", + }, + }, + }, + }) +end + +return M diff --git a/.config/nvim/lua/plugins/conform_nvim.lua b/.config/nvim/lua/plugins/conform_nvim.lua new file mode 100644 index 0000000..21c2659 --- /dev/null +++ b/.config/nvim/lua/plugins/conform_nvim.lua @@ -0,0 +1,56 @@ +local M = {} + +M.install = { src = "https://github.com/stevearc/conform.nvim" } + +M.setup = function() + local conform = require("conform") + + conform.setup({ + formatters_by_ft = { + lua = { "stylua" }, + go = { "goimports", "gofmt" }, + javascript = { "prettierd" }, + typescript = { "prettierd" }, + typescriptreact = { "prettierd" }, + vue = { "prettierd" }, + css = { "prettierd" }, + html = { "prettierd" }, + markdown = { "prettierd" }, + json = { "fixjson" }, + rust = { "rustfmt" }, + shell = { "shfmt", "shellcheck" }, + python = { "isort", "black" }, + php = { "phpcbf", "php_cs_fixer" }, + blade = { "blade-formatter" } + }, + log_level = vim.log.levels.WARN, + notify_on_error = false, + }) + + vim.keymap.set({ "n", "v" }, "F", function() + conform.format({ + lsp_fallback = true, + async = false, + timeout_ms = 500, + }) + end) + + vim.fn.mkdir(vim.fn.expand("~/.cache/php-cs-fixer"), "p") + + conform.formatters.php_cs_fixer = { + prepend_args = { + "--config=" .. vim.fn.expand("~/.config/php-cs-fixer.php"), + "--cache-file=" .. vim.fn.expand("~/.cache/php-cs-fixer/cache"), + }, + env = { + PHP_CS_FIXER_IGNORE_ENV = "1", + }, + } + + conform.formatters.phpcbf = { + prepend_args = { "--standard=~/.config/phpcs.xml" }, + + } +end + +return M diff --git a/.config/nvim/lua/plugins/diffview.lua b/.config/nvim/lua/plugins/diffview_nvim.lua similarity index 100% rename from .config/nvim/lua/plugins/diffview.lua rename to .config/nvim/lua/plugins/diffview_nvim.lua diff --git a/.config/nvim/lua/plugins/gitsigns.lua b/.config/nvim/lua/plugins/gitsigns_nvim.lua similarity index 100% rename from .config/nvim/lua/plugins/gitsigns.lua rename to .config/nvim/lua/plugins/gitsigns_nvim.lua diff --git a/.config/nvim/lua/plugins/harpoon.lua b/.config/nvim/lua/plugins/harpoon.lua index d4bb05d..7acab49 100644 --- a/.config/nvim/lua/plugins/harpoon.lua +++ b/.config/nvim/lua/plugins/harpoon.lua @@ -6,7 +6,6 @@ M.dependencies = { { src = "https://github.com/nvim-lua/plenary.nvim" }, } - M.setup = function() local harpoon = require("harpoon") diff --git a/.config/nvim/lua/plugins/lspconfig.lua b/.config/nvim/lua/plugins/lspconfig.lua index d491928..30e6c6a 100644 --- a/.config/nvim/lua/plugins/lspconfig.lua +++ b/.config/nvim/lua/plugins/lspconfig.lua @@ -55,7 +55,7 @@ M.setup = function() end, { desc = 'Buffer diagnostics' }) -- LSP Format - vim.keymap.set("n", "F", function() + vim.keymap.set("n", "lF", function() vim.lsp.buf.format() end, { desc = "LSP Format" }) @@ -108,34 +108,6 @@ M.setup = function() local client = vim.lsp.get_client_by_id(event.data.client_id) - if client and client:supports_method('textDocument/completion') then - -- Optional: trigger autocompletion on EVERY keypress. May be slow! - local chars = {}; for i = 32, 126 do table.insert(chars, string.char(i)) end - client.server_capabilities.completionProvider.triggerCharacters = chars - vim.lsp.completion.enable(true, client.id, event.buf, { - autotrigger = true, - -- Prevent auto-selection of first item - autocomplete = false - }) - - -- Map Ctrl+y to select first item and accept completion - vim.keymap.set('i', '', function() - if vim.fn.pumvisible() == 1 then - -- If completion menu is visible, select first item if nothing selected, then accept - local selected = vim.fn.complete_info({'selected'}).selected - if selected == -1 then - -- Nothing selected, select first item then accept - return '' - else - -- Something already selected, just accept - return '' - end - else - return '' - end - end, { expr = true, buffer = event.buf, desc = 'Accept completion' }) - end - if client and client.server_capabilities.documentHighlightProvider then vim.api.nvim_create_autocmd("LspDetach", { group = vim.api.nvim_create_augroup("LspDetach", { clear = true }), @@ -162,9 +134,14 @@ M.setup = function() end end + -- Get capabilities from blink.cmp + local capabilities = require("blink.cmp").get_lsp_capabilities() + -- Setup all servers using the new vim.lsp.config and vim.lsp.enable APIs for server_name, server in pairs(servers) do - vim.lsp.config(server_name, server or {}) + local config = server or {} + config.capabilities = vim.tbl_deep_extend('force', capabilities, config.capabilities or {}) + vim.lsp.config(server_name, config) vim.lsp.enable(server_name) end end diff --git a/.config/nvim/lua/plugins/oil.lua b/.config/nvim/lua/plugins/oil_nvim.lua similarity index 100% rename from .config/nvim/lua/plugins/oil.lua rename to .config/nvim/lua/plugins/oil_nvim.lua diff --git a/.config/nvim/lua/plugins/treesitter-textobjects.lua b/.config/nvim/lua/plugins/treesitter-textobjects.lua index 48dca84..518022b 100644 --- a/.config/nvim/lua/plugins/treesitter-textobjects.lua +++ b/.config/nvim/lua/plugins/treesitter-textobjects.lua @@ -38,12 +38,12 @@ M.setup = function() } -- Select textobjects local select = require('nvim-treesitter-textobjects.select') - vim.keymap.set({'n', 'x', 'o'}, 'af', function() select.select_textobject('@function.outer', 'textobjects') end) - vim.keymap.set({'n', 'x', 'o'}, 'if', function() select.select_textobject('@function.inner', 'textobjects') end) - vim.keymap.set({'n', 'x', 'o'}, 'ac', function() select.select_textobject('@conditional.outer', 'textobjects') end) - vim.keymap.set({'n', 'x', 'o'}, 'ic', function() select.select_textobject('@conditional.inner', 'textobjects') end) - vim.keymap.set({'n', 'x', 'o'}, 'al', function() select.select_textobject('@loop.outer', 'textobjects') end) - vim.keymap.set({'n', 'x', 'o'}, 'il', function() select.select_textobject('@loop.inner', 'textobjects') end) + vim.keymap.set({'x', 'o'}, 'af', function() select.select_textobject('@function.outer', 'textobjects') end) + vim.keymap.set({'x', 'o'}, 'if', function() select.select_textobject('@function.inner', 'textobjects') end) + vim.keymap.set({'x', 'o'}, 'ac', function() select.select_textobject('@conditional.outer', 'textobjects') end) + vim.keymap.set({'x', 'o'}, 'ic', function() select.select_textobject('@conditional.inner', 'textobjects') end) + vim.keymap.set({'x', 'o'}, 'al', function() select.select_textobject('@loop.outer', 'textobjects') end) + vim.keymap.set({'x', 'o'}, 'il', function() select.select_textobject('@loop.inner', 'textobjects') end) -- Move textobjects local move = require('nvim-treesitter-textobjects.move') diff --git a/.config/nvim/lua/plugins/treesitter.lua b/.config/nvim/lua/plugins/treesitter.lua index 3f74c55..100f800 100644 --- a/.config/nvim/lua/plugins/treesitter.lua +++ b/.config/nvim/lua/plugins/treesitter.lua @@ -28,7 +28,9 @@ M.setup = function() 'gitignore', 'php', 'latex', - 'blade' + 'blade', + 'vue', + 'go', }) vim.api.nvim_create_autocmd('FileType', { @@ -36,6 +38,7 @@ M.setup = function() 'php', 'ts', 'vue', + 'go', }, callback = function() vim.treesitter.start() end, }) diff --git a/.config/nvim/nvim-pack-lock.json b/.config/nvim/nvim-pack-lock.json index 85e1d08..87b2727 100644 --- a/.config/nvim/nvim-pack-lock.json +++ b/.config/nvim/nvim-pack-lock.json @@ -4,10 +4,26 @@ "rev": "1900f89dc17c603eec29960f57c00bd9ae696495", "src": "https://github.com/antoinemadec/FixCursorHold.nvim" }, + "blink.cmp": { + "rev": "10c164bbdf065f9781b6cc2f7d068c016276055b", + "src": "https://github.com/saghen/blink.cmp" + }, + "blink.nvim": { + "rev": "d1e7c7c45d45c6b6a25427bf62db4db73b03ff3d", + "src": "https://github.com/saghen/blink.nvim" + }, + "conform.nvim": { + "rev": "8314f4c9e205e7f30b62147069729f9a1227d8bf", + "src": "https://github.com/stevearc/conform.nvim" + }, "diffview.nvim": { "rev": "4516612fe98ff56ae0415a259ff6361a89419b0a", "src": "https://github.com/sindrets/diffview.nvim" }, + "friendly-snippets": { + "rev": "572f5660cf05f8cd8834e096d7b4c921ba18e175", + "src": "https://github.com/rafamadriz/friendly-snippets" + }, "gitsigns.nvim": { "rev": "130beacf8a51f00aede9c31064c749136679a321", "src": "https://github.com/lewis6991/gitsigns.nvim" diff --git a/.config/tmux/plugins/catppuccin/tmux/themes/catppuccin_cyberdream_tmux.conf b/.config/tmux/plugins/catppuccin/tmux/themes/catppuccin_cyberdream_tmux.conf deleted file mode 100644 index a475db7..0000000 --- a/.config/tmux/plugins/catppuccin/tmux/themes/catppuccin_cyberdream_tmux.conf +++ /dev/null @@ -1,2035 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - cyberdream.nvim/extras/tmux/cyberdream.conf at main · scottmckendry/cyberdream.nvim · GitHub - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- Skip to content - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - -
- -
- - - - - - - - -
- - - - - -
- - - - - - - - - -
-
-
- - - - - - - - - -
- -
- -
- -
- - - - / - - cyberdream.nvim - - - Public -
- - -
- -
- - -
-
- -
-
- - - - -
- - - - - - -
- - - - - - - - - - - - - - - - - - -
-
- - - - -
- -
- -
-
- -
- -
-

Footer

- - - - -
-
- - - - - © 2025 GitHub, Inc. - -
- - -
-
- - - - - - - - - - - - - - - - - - - -
-
-
- - -