From d49da85cc81e56efd9ce48c0e7fd5792e74ec005 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B7=E9=85=94=E9=96=91=E5=90=9F?= <50296129+Jint-lzxy@users.noreply.github.com> Date: Mon, 8 Apr 2024 22:27:03 +0800 Subject: [PATCH 01/15] chore(plugins): tidying up (#1221) This commit mainly tweaks the loading events of some plugins to align with upstream specifications. Additionally, there have been enhancements made to certain documentation. Signed-off-by: Jint-lzxy <50296129+Jint-lzxy@users.noreply.github.com> --- lua/keymap/editor.lua | 30 +++--- lua/modules/configs/completion/neoconf.lua | 29 +----- lua/modules/configs/editor/align.lua | 11 +++ .../configs/editor/local-highlight.lua | 7 +- lua/modules/configs/editor/mini-align.lua | 8 -- lua/modules/configs/editor/smart-splits.lua | 92 ------------------- lua/modules/configs/editor/splits.lua | 14 +++ lua/modules/configs/ui/catppuccin.lua | 2 +- lua/modules/configs/ui/lualine.lua | 2 +- lua/modules/configs/ui/todo.lua | 42 +++++++++ lua/modules/plugins/completion.lua | 2 +- lua/modules/plugins/editor.lua | 13 ++- lua/modules/plugins/ui.lua | 5 +- 13 files changed, 104 insertions(+), 153 deletions(-) create mode 100644 lua/modules/configs/editor/align.lua delete mode 100644 lua/modules/configs/editor/mini-align.lua delete mode 100644 lua/modules/configs/editor/smart-splits.lua create mode 100644 lua/modules/configs/editor/splits.lua create mode 100644 lua/modules/configs/ui/todo.lua diff --git a/lua/keymap/editor.lua b/lua/keymap/editor.lua index 76845a616..9b0271cee 100644 --- a/lua/keymap/editor.lua +++ b/lua/keymap/editor.lua @@ -68,28 +68,36 @@ local plug_map = { ["n|"] = map_cu("SmartCursorMoveDown"):with_silent():with_noremap():with_desc("window: Focus down"), ["n|"] = map_cu("SmartCursorMoveUp"):with_silent():with_noremap():with_desc("window: Focus up"), ["n|"] = map_cu("SmartCursorMoveRight"):with_silent():with_noremap():with_desc("window: Focus right"), - ["n|Wh"] = map_cu("SmartSwapLeft"):with_silent():with_noremap():with_desc("window: Move window to left"), - ["n|Wj"] = map_cu("SmartSwapDown"):with_silent():with_noremap():with_desc("window: Move window to down"), - ["n|Wk"] = map_cu("SmartSwapUp"):with_silent():with_noremap():with_desc("window: Move window to up"), - ["n|Wl"] = map_cu("SmartSwapRight"):with_silent():with_noremap():with_desc("window: Move window to right"), + ["n|Wh"] = map_cu("SmartSwapLeft"):with_silent():with_noremap():with_desc("window: Move window leftward"), + ["n|Wj"] = map_cu("SmartSwapDown"):with_silent():with_noremap():with_desc("window: Move window downward"), + ["n|Wk"] = map_cu("SmartSwapUp"):with_silent():with_noremap():with_desc("window: Move window upward"), + ["n|Wl"] = map_cu("SmartSwapRight"):with_silent():with_noremap():with_desc("window: Move window rightward"), -- Plugin: nvim-spectre - ["n|Ss"] = map_cmd([[lua require("spectre").toggle()]]) + ["n|Ss"] = map_callback(function() + require("spectre").toggle() + end) :with_silent() :with_noremap() - :with_desc("editn: Toggle search&replace panel"), - ["n|Sp"] = map_cmd([[lua require("spectre").open_visual({select_word=true})]]) + :with_desc("editn: Toggle search & replace panel"), + ["n|Sp"] = map_callback(function() + require("spectre").open_visual({ select_word = true }) + end) :with_silent() :with_noremap() :with_desc("editn: search&replace current word (project)"), - ["v|Sp"] = map_cmd([[lua require("spectre").open_visual()]]) + ["v|Sp"] = map_callback(function() + require("spectre").open_visual() + end) :with_silent() :with_noremap() - :with_desc("edit: search&replace current word (project)"), - ["n|Sf"] = map_cmd([[lua require("spectre").open_file_search({select_word=true})]]) + :with_desc("edit: search & replace current word (project)"), + ["n|Sf"] = map_callback(function() + require("spectre").open_file_search({ select_word = true }) + end) :with_silent() :with_noremap() - :with_desc("editn: search&replace current word (file)"), + :with_desc("editn: search & replace current word (file)"), -- Plugin: nvim-treehopper ["o|m"] = map_cu("lua require('tsht').nodes()"):with_silent():with_desc("jump: Operate across syntax tree"), diff --git a/lua/modules/configs/completion/neoconf.lua b/lua/modules/configs/completion/neoconf.lua index 4deef7695..4db9cc75f 100644 --- a/lua/modules/configs/completion/neoconf.lua +++ b/lua/modules/configs/completion/neoconf.lua @@ -2,6 +2,8 @@ local M = {} M.setup = function() require("modules.utils").load_plugin("neoconf", { + -- send new configuration to lsp clients when changing json settings + live_reload = true, -- name of the local settings files local_settings = ".neoconf.json", -- name of the global settings file in your Neovim config directory @@ -12,33 +14,6 @@ M.setup = function() coc = true, -- global/local coc-settings.json nlsp = true, -- global/local nlsp-settings.nvim json settings }, - -- send new configuration to lsp clients when changing json settings - live_reload = true, - -- set the filetype to jsonc for settings files, so you can use comments - -- make sure you have the jsonc treesitter parser installed! - filetype_jsonc = true, - plugins = { - -- configures lsp clients with settings in the following order: - -- - lua settings passed in lspconfig setup - -- - global json settings - -- - local json settings - lspconfig = { - enabled = true, - }, - -- configures jsonls to get completion in .nvim.settings.json files - jsonls = { - enabled = true, - -- only show completion in json settings for configured lsp servers - configured_servers_only = true, - }, - -- configures lua_ls to get completion of lspconfig server settings - lua_ls = { - -- by default, lua_ls annotations are only enabled in your neovim config directory - enabled_for_neovim_config = true, - -- explicitely enable adding annotations. Mostly relevant to put in your local .nvim.settings.json file - enabled = false, - }, - }, }) end diff --git a/lua/modules/configs/editor/align.lua b/lua/modules/configs/editor/align.lua new file mode 100644 index 000000000..43c50d8dc --- /dev/null +++ b/lua/modules/configs/editor/align.lua @@ -0,0 +1,11 @@ +return function() + require("modules.utils").load_plugin("mini.align", { + -- Whether to disable showing non-error feedback + silent = false, + -- Module mappings. Use `''` (empty string) to disable one. + mappings = { + start = "gea", + start_with_preview = "geA", + }, + }) +end diff --git a/lua/modules/configs/editor/local-highlight.lua b/lua/modules/configs/editor/local-highlight.lua index 022440396..f8c001f3d 100644 --- a/lua/modules/configs/editor/local-highlight.lua +++ b/lua/modules/configs/editor/local-highlight.lua @@ -1,11 +1,6 @@ return function() require("modules.utils").load_plugin("local-highlight", { - file_types = nil, - hlgroup = "Search", - cw_hlgroup = nil, - -- Whether to display highlights in INSERT mode or not + hlgroup = "IlluminatedWordText", insert_mode = false, - min_match_len = 1, - max_match_len = math.huge, }) end diff --git a/lua/modules/configs/editor/mini-align.lua b/lua/modules/configs/editor/mini-align.lua deleted file mode 100644 index 4cbf7fed6..000000000 --- a/lua/modules/configs/editor/mini-align.lua +++ /dev/null @@ -1,8 +0,0 @@ -return function() - require("mini.align").setup({ - mappings = { - start = "gea", - start_with_preview = "geA", - }, - }) -end diff --git a/lua/modules/configs/editor/smart-splits.lua b/lua/modules/configs/editor/smart-splits.lua deleted file mode 100644 index 3ea0ceb44..000000000 --- a/lua/modules/configs/editor/smart-splits.lua +++ /dev/null @@ -1,92 +0,0 @@ -return function() - require("modules.utils").load_plugin("smart-splits", { - -- Ignored buffer types (only while resizing) - ignored_buftypes = { - "nofile", - "quickfix", - "prompt", - }, - -- Ignored filetypes (only while resizing) - ignored_filetypes = { "NvimTree" }, - -- the default number of lines/columns to resize by at a time - default_amount = 3, - -- Desired behavior when your cursor is at an edge and you - -- are moving towards that same edge: - -- 'wrap' => Wrap to opposite side - -- 'split' => Create a new split in the desired direction - -- 'stop' => Do nothing - -- function => You handle the behavior yourself - -- NOTE: If using a function, the function will be called with - -- a context object with the following fields: - -- { - -- mux = { - -- type:'tmux'|'wezterm'|'kitty' - -- current_pane_id():number, - -- is_in_session(): boolean - -- current_pane_is_zoomed():boolean, - -- -- following methods return a boolean to indicate success or failure - -- current_pane_at_edge(direction:'left'|'right'|'up'|'down'):boolean - -- next_pane(direction:'left'|'right'|'up'|'down'):boolean - -- resize_pane(direction:'left'|'right'|'up'|'down'):boolean - -- split_pane(direction:'left'|'right'|'up'|'down',size:number|nil):boolean - -- }, - -- direction = 'left'|'right'|'up'|'down', - -- split(), -- utility function to split current Neovim pane in the current direction - -- wrap(), -- utility function to wrap to opposite Neovim pane - -- } - -- NOTE: `at_edge = 'wrap'` is not supported on Kitty terminal - -- multiplexer, as there is no way to determine layout via the CLI - at_edge = "wrap", - -- when moving cursor between splits left or right, - -- place the cursor on the same row of the *screen* - -- regardless of line numbers. False by default. - -- Can be overridden via function parameter, see Usage. - move_cursor_same_row = false, - -- whether the cursor should follow the buffer when swapping - -- buffers by default; it can also be controlled by passing - -- `{ move_cursor = true }` or `{ move_cursor = false }` - -- when calling the Lua function. - cursor_follows_swapped_bufs = false, - -- resize mode options - resize_mode = { - -- key to exit persistent resize mode - quit_key = "", - -- keys to use for moving in resize mode - -- in order of left, down, up' right - resize_keys = { "h", "j", "k", "l" }, - -- set to true to silence the notifications - -- when entering/exiting persistent resize mode - silent = false, - -- must be functions, they will be executed when - -- entering or exiting the resize mode - hooks = { - on_enter = nil, - on_leave = nil, - }, - }, - -- ignore these autocmd events (via :h eventignore) while processing - -- smart-splits.nvim computations, which involve visiting different - -- buffers and windows. These events will be ignored during processing, - -- and un-ignored on completed. This only applies to resize events, - -- not cursor movement events. - ignored_events = { - "BufEnter", - "WinEnter", - }, - -- enable or disable a multiplexer integration; - -- automatically determined, unless explicitly disabled or set, - -- by checking the $TERM_PROGRAM environment variable, - -- and the $KITTY_LISTEN_ON environment variable for Kitty - multiplexer_integration = "tmux", - -- disable multiplexer navigation if current multiplexer pane is zoomed - -- this functionality is only supported on tmux and Wezterm due to kitty - -- not having a way to check if a pane is zoomed - disable_multiplexer_nav_when_zoomed = true, - -- Supply a Kitty remote control password if needed, - -- or you can also set vim.g.smart_splits_kitty_password - -- see https://sw.kovidgoyal.net/kitty/conf/#opt-kitty.remote_control_password - kitty_password = nil, - -- default logging level, one of: 'trace'|'debug'|'info'|'warn'|'error'|'fatal' - log_level = "info", - }) -end diff --git a/lua/modules/configs/editor/splits.lua b/lua/modules/configs/editor/splits.lua new file mode 100644 index 000000000..891d01eaf --- /dev/null +++ b/lua/modules/configs/editor/splits.lua @@ -0,0 +1,14 @@ +return function() + require("modules.utils").load_plugin("smart-splits", { + -- Ignored buffer types (only while resizing) + ignored_buftypes = { + "nofile", + "quickfix", + "prompt", + }, + -- Ignored filetypes (only while resizing) + ignored_filetypes = { "NvimTree" }, + -- the default number of lines/columns to resize by at a time + default_amount = 3, + }) +end diff --git a/lua/modules/configs/ui/catppuccin.lua b/lua/modules/configs/ui/catppuccin.lua index 4eec738ed..9d1e8400e 100644 --- a/lua/modules/configs/ui/catppuccin.lua +++ b/lua/modules/configs/ui/catppuccin.lua @@ -64,7 +64,7 @@ return function() harpoon = false, headlines = false, hop = true, - illuminate = false, + illuminate = true, indent_blankline = { enabled = true, colored_indent_levels = false }, leap = false, lightspeed = false, diff --git a/lua/modules/configs/ui/lualine.lua b/lua/modules/configs/ui/lualine.lua index d5108ed8a..34d0d187c 100644 --- a/lua/modules/configs/ui/lualine.lua +++ b/lua/modules/configs/ui/lualine.lua @@ -218,7 +218,7 @@ return function() tabwidth = { function() - return icons.ui.Tab .. vim.api.nvim_get_option_value("shiftwidth", { scope = "local" }) + return icons.ui.Tab .. vim.api.nvim_get_option_value("tabstop", { scope = "local" }) end, padding = 1, }, diff --git a/lua/modules/configs/ui/todo.lua b/lua/modules/configs/ui/todo.lua new file mode 100644 index 000000000..1fbd248e2 --- /dev/null +++ b/lua/modules/configs/ui/todo.lua @@ -0,0 +1,42 @@ +return function() + local icons = { + diagnostics = require("modules.utils.icons").get("diagnostics"), + ui = require("modules.utils.icons").get("ui"), + } + + require("modules.utils").load_plugin("todo-comments", { + signs = false, -- show icons in the signs column + keywords = { + FIX = { + icon = icons.ui.Bug, + color = "error", + alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, + }, + TODO = { icon = icons.ui.Accepted, color = "info" }, + -- HACK = { icon = icons.ui.Fire, color = "warning" }, + WARN = { icon = icons.diagnostics.Warning, color = "warning", alt = { "WARNING", "XXX" } }, + PERF = { icon = icons.ui.Perf, alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } }, + NOTE = { icon = icons.ui.Note, color = "hint", alt = { "INFO" } }, + }, + gui_style = { + fg = "NONE", + bg = "BOLD", + }, + merge_keywords = true, + highlight = { + multiline = false, + keyword = "wide", -- "fg", "bg", "wide", "wide_bg", "wide_fg" or empty. + after = "", + comments_only = true, + max_line_len = 500, + exclude = { "big_file_disabled_ft" }, + }, + colors = { + error = { "DiagnosticError", "ErrorMsg", "#DC2626" }, + warning = { "DiagnosticWarn", "WarningMsg", "#FBBF24" }, + info = { "DiagnosticInfo", "#2563EB" }, + hint = { "DiagnosticHint", "#F5C2E7" }, + default = { "Conditional", "#7C3AED" }, + }, + }) +end diff --git a/lua/modules/plugins/completion.lua b/lua/modules/plugins/completion.lua index 7928615a8..d4b5d088d 100644 --- a/lua/modules/plugins/completion.lua +++ b/lua/modules/plugins/completion.lua @@ -63,7 +63,7 @@ completion["hrsh7th/nvim-cmp"] = { { "f3fora/cmp-spell" }, { "hrsh7th/cmp-buffer" }, { "kdheepak/cmp-latex-symbols" }, - { "ray-x/cmp-treesitter" }, + { "ray-x/cmp-treesitter", commit = "c8e3a74" }, -- { "tzachar/cmp-tabnine", build = "./install.sh", config = require("completion.tabnine") }, -- { -- "jcdickinson/codeium.nvim", diff --git a/lua/modules/plugins/editor.lua b/lua/modules/plugins/editor.lua index 3d0fdd93e..7a102e12a 100644 --- a/lua/modules/plugins/editor.lua +++ b/lua/modules/plugins/editor.lua @@ -51,8 +51,9 @@ editor["sindrets/diffview.nvim"] = { config = require("editor.diffview"), } editor["echasnovski/mini.align"] = { - version = false, - config = require("editor.mini-align"), + lazy = true, + event = { "CursorHold", "CursorHoldI" }, + config = require("editor.align"), } editor["smoka7/hop.nvim"] = { lazy = true, @@ -78,14 +79,18 @@ editor["tpope/vim-sleuth"] = { lazy = true, event = "BufReadPre", } +editor["tpope/vim-sleuth"] = { + lazy = true, + event = { "BufNewFile", "BufReadPost", "BufFilePost" }, +} editor["nvim-pack/nvim-spectre"] = { lazy = true, - cmd = { "Spectre" }, + cmd = "Spectre", } editor["mrjones2014/smart-splits.nvim"] = { lazy = true, event = { "CursorHoldI", "CursorHold" }, - config = require("editor.smart-splits"), + config = require("editor.splits"), } ---------------------------------------------------------------------- diff --git a/lua/modules/plugins/ui.lua b/lua/modules/plugins/ui.lua index e94201294..062f2b0b5 100644 --- a/lua/modules/plugins/ui.lua +++ b/lua/modules/plugins/ui.lua @@ -59,8 +59,9 @@ ui["folke/paint.nvim"] = { } ui["folke/todo-comments.nvim"] = { lazy = true, - event = { "BufReadPost" }, - opts = {}, + event = { "CursorHold", "CursorHoldI" }, + config = require("ui.todo"), + dependencies = { "nvim-lua/plenary.nvim" }, } ui["dstein64/nvim-scrollview"] = { lazy = true, From 2c2879209f19d20073a9f977a7cafbee583646b4 Mon Sep 17 00:00:00 2001 From: Jint-lzxy <50296129+Jint-lzxy@users.noreply.github.com> Date: Mon, 8 Apr 2024 23:50:21 +0800 Subject: [PATCH 02/15] fix(plugins): remove duplicate specifications Signed-off-by: Jint-lzxy <50296129+Jint-lzxy@users.noreply.github.com> --- lua/modules/plugins/editor.lua | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lua/modules/plugins/editor.lua b/lua/modules/plugins/editor.lua index 7a102e12a..04019c3ad 100644 --- a/lua/modules/plugins/editor.lua +++ b/lua/modules/plugins/editor.lua @@ -75,10 +75,6 @@ editor["lambdalisue/suda.vim"] = { cmd = { "SudaRead", "SudaWrite" }, config = require("editor.suda"), } -editor["tpope/vim-sleuth"] = { - lazy = true, - event = "BufReadPre", -} editor["tpope/vim-sleuth"] = { lazy = true, event = { "BufNewFile", "BufReadPost", "BufFilePost" }, From 510ee71578d81c7b627175dd38de633a039d862c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 9 Apr 2024 01:48:11 +0000 Subject: [PATCH 03/15] chore(lockfile): auto update lazy-lock.json --- lazy-lock.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 24cb128b4..ef05da5c3 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -14,7 +14,7 @@ "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp-spell": { "branch": "master", "commit": "32a0867efa59b43edbb2db67b0871cfad90c9b66" }, "cmp-tmux": { "branch": "main", "commit": "95b1b921802e6f60627b3e76afb9380fddd87f9a" }, - "cmp-treesitter": { "branch": "master", "commit": "13e4ef8f4dd5639fca2eb9150e68f47639a9b37d" }, + "cmp-treesitter": { "branch": "master", "commit": "c8e3a74b51597d69d240085a258636972ce98e15" }, "cmp-under-comparator": { "branch": "master", "commit": "6857f10272c3cfe930cece2afa2406e1385bfef8" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "copilot-cmp": { "branch": "master", "commit": "72fbaa03695779f8349be3ac54fa8bd77eed3ee3" }, @@ -25,9 +25,9 @@ "fidget.nvim": { "branch": "main", "commit": "1ba38e4cbb24683973e00c2e36f53ae64da38ef5" }, "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" }, "friendly-snippets": { "branch": "main", "commit": "ea068f1becd91bcd4591fceb6420d4335e2e14d3" }, - "fzf": { "branch": "master", "commit": "69b9d674a3842cc2a12d88268db1db7248cb61a6" }, + "fzf": { "branch": "master", "commit": "4cd37fc02b4491d4c9a5f6a27ad41895ad1a62cc" }, "fzy-lua-native": { "branch": "master", "commit": "820f745b7c442176bcc243e8f38ef4b985febfaf" }, - "gitsigns.nvim": { "branch": "main", "commit": "81369ed5405ec0c5d55a9608b495dbf827415116" }, + "gitsigns.nvim": { "branch": "main", "commit": "1a50b94066def8591d5f65bd60a4233902e9def4" }, "glance.nvim": { "branch": "master", "commit": "51059bcf21016387b6233c89eed220cf47fca752" }, "hop.nvim": { "branch": "master", "commit": "6d853addd6e11df8338b26e869a29b36f2c3e893" }, "indent-blankline.nvim": { "branch": "master", "commit": "3d08501caef2329aba5121b753e903904088f7e6" }, @@ -46,7 +46,7 @@ "neoconf.nvim": { "branch": "main", "commit": "7b989fb3a180ec79b78a183d10e417b2fdeb3c05" }, "neodim": { "branch": "master", "commit": "9477da03b93f1984a81fee3b92e6ac7c6ada6aa4" }, "neoscroll.nvim": { "branch": "master", "commit": "21d52973bde32db998fc8b6590f87eb3c3c6d8e4" }, - "none-ls.nvim": { "branch": "main", "commit": "0d42ba8d506242b2252d2d2885a7f6f4f5b2bcb2" }, + "none-ls.nvim": { "branch": "main", "commit": "dca7ddec321a102ec9e792b1b29193702aff5fbb" }, "nvim-bqf": { "branch": "main", "commit": "52703d7adc3be3f7c09eea9a80c5b8caa615fb25" }, "nvim-bufdel": { "branch": "main", "commit": "523d58e94e7212fff3e05c247b962dc8f93bcfde" }, "nvim-cmp": { "branch": "main", "commit": "ce16de5665c766f39c271705b17fff06f7bcb84f" }, @@ -60,12 +60,12 @@ "nvim-spectre": { "branch": "master", "commit": "2b012554a2536465243c0dff3605b5927c49ed23" }, "nvim-tree.lua": { "branch": "master", "commit": "81eb8d519233c105f30dc0a278607e62b20502fd" }, "nvim-treehopper": { "branch": "master", "commit": "5a28bff46c05d28bdb4bcaef67e046eb915a9390" }, - "nvim-treesitter": { "branch": "master", "commit": "a2d6678bb21052013d0dd7cb35dffbac13846c98" }, + "nvim-treesitter": { "branch": "master", "commit": "46b587eb38701c02360042fce284cc8ec2653c30" }, "nvim-treesitter-context": { "branch": "master", "commit": "f19766163c18515fb4d3c12d572bf9cba6cdb990" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "f5183cea0fda26126e22e789382c208e7b1120f4" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "2aa454e4037424c678a8ff033951a5be39e54b9c" }, "nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "734ebad31c81c6198dfe102aa23280937c937c42" }, - "nvim-web-devicons": { "branch": "master", "commit": "e2e3475c7bffbafbda19df2be6ffd04f6d1a3e16" }, + "nvim-web-devicons": { "branch": "master", "commit": "20921d33c605ba24c8d0b76b379a54a9c83ba170" }, "paint.nvim": { "branch": "main", "commit": "6ce64212804f425073c61ab0d9c2b034f0435260" }, "persisted.nvim": { "branch": "main", "commit": "ca9900c31ee6e254a0ba7011ba49f48ebf4c8db2" }, "plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" }, @@ -85,7 +85,7 @@ "toggleterm.nvim": { "branch": "main", "commit": "193786e0371e3286d3bc9aa0079da1cd41beaa62" }, "trouble.nvim": { "branch": "main", "commit": "b9cf677f20bb2faa2dacfa870b084e568dca9572" }, "vim-cool": { "branch": "master", "commit": "662e7b11064cbeedad17c45d2fe926e78d3cd0b6" }, - "vim-fugitive": { "branch": "master", "commit": "c0b03f1cac242d96837326d300f42a660306fc1a" }, + "vim-fugitive": { "branch": "master", "commit": "dac8e5c2d85926df92672bf2afb4fc48656d96c7" }, "vim-go": { "branch": "master", "commit": "14eedf6135cf4253b0ed48a0b53d6834a40da1c4" }, "vim-matchup": { "branch": "master", "commit": "2d660e4aa7c566014c667af2cda0458043527902" }, "vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" }, From 9bf34087be05f9bcc7393ab15f2f8d687f14bd64 Mon Sep 17 00:00:00 2001 From: Mohu Date: Tue, 9 Apr 2024 17:30:37 +0800 Subject: [PATCH 04/15] fix: use `init` for vim plugins (#1222) Signed-off-by: ayamir --- lua/modules/plugins/editor.lua | 2 +- lua/modules/plugins/lang.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/modules/plugins/editor.lua b/lua/modules/plugins/editor.lua index 04019c3ad..73b273351 100644 --- a/lua/modules/plugins/editor.lua +++ b/lua/modules/plugins/editor.lua @@ -73,7 +73,7 @@ editor["romainl/vim-cool"] = { editor["lambdalisue/suda.vim"] = { lazy = true, cmd = { "SudaRead", "SudaWrite" }, - config = require("editor.suda"), + init = require("editor.suda"), } editor["tpope/vim-sleuth"] = { lazy = true, diff --git a/lua/modules/plugins/lang.lua b/lua/modules/plugins/lang.lua index b809b4261..77dacd97c 100644 --- a/lua/modules/plugins/lang.lua +++ b/lua/modules/plugins/lang.lua @@ -12,7 +12,7 @@ lang["fatih/vim-go"] = { lazy = true, ft = "go", build = ":GoInstallBinaries", - config = require("lang.vim-go"), + init = require("lang.vim-go"), } lang["mrcjkb/rustaceanvim"] = { lazy = true, From 85fdabd147d3e0aac317019ec93c084c55526a53 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 10 Apr 2024 01:51:25 +0000 Subject: [PATCH 05/15] chore(lockfile): auto update lazy-lock.json --- lazy-lock.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index ef05da5c3..ca4e35ad0 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -25,7 +25,7 @@ "fidget.nvim": { "branch": "main", "commit": "1ba38e4cbb24683973e00c2e36f53ae64da38ef5" }, "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" }, "friendly-snippets": { "branch": "main", "commit": "ea068f1becd91bcd4591fceb6420d4335e2e14d3" }, - "fzf": { "branch": "master", "commit": "4cd37fc02b4491d4c9a5f6a27ad41895ad1a62cc" }, + "fzf": { "branch": "master", "commit": "17bb7ad2784afdfc99beeec9e0a58f8dae12748a" }, "fzy-lua-native": { "branch": "master", "commit": "820f745b7c442176bcc243e8f38ef4b985febfaf" }, "gitsigns.nvim": { "branch": "main", "commit": "1a50b94066def8591d5f65bd60a4233902e9def4" }, "glance.nvim": { "branch": "master", "commit": "51059bcf21016387b6233c89eed220cf47fca752" }, @@ -39,11 +39,11 @@ "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "44509689b9bf3984d729cc264aacb31cb7f41668" }, - "mason-null-ls.nvim": { "branch": "main", "commit": "2b8433f76598397fcc97318d410e0c4f7a4bea6a" }, + "mason-null-ls.nvim": { "branch": "main", "commit": "de19726de7260c68d94691afb057fa73d3cc53e7" }, "mason-nvim-dap.nvim": { "branch": "main", "commit": "67210c0e775adec55de9826b038e8b62de554afc" }, "mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" }, "mini.align": { "branch": "main", "commit": "f845218c5fea89e49074e48270dc5e1b9511a0f9" }, - "neoconf.nvim": { "branch": "main", "commit": "7b989fb3a180ec79b78a183d10e417b2fdeb3c05" }, + "neoconf.nvim": { "branch": "main", "commit": "9d61ff423ae5f179ace1823300c4873f38a7c418" }, "neodim": { "branch": "master", "commit": "9477da03b93f1984a81fee3b92e6ac7c6ada6aa4" }, "neoscroll.nvim": { "branch": "master", "commit": "21d52973bde32db998fc8b6590f87eb3c3c6d8e4" }, "none-ls.nvim": { "branch": "main", "commit": "dca7ddec321a102ec9e792b1b29193702aff5fbb" }, @@ -53,19 +53,19 @@ "nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" }, "nvim-dap": { "branch": "master", "commit": "405df1dcc2e395ab5173a9c3d00e03942c023074" }, "nvim-dap-ui": { "branch": "master", "commit": "edfa93f60b189e5952c016eee262d0685d838450" }, - "nvim-lspconfig": { "branch": "master", "commit": "9619e53d3f99f0ca4ea3b88f5d97fce703131820" }, + "nvim-lspconfig": { "branch": "master", "commit": "e25c4cdecd3d58c0deccce0f372426c8c480bcce" }, "nvim-nio": { "branch": "master", "commit": "5800f585def265d52f1d8848133217c800bcb25d" }, "nvim-notify": { "branch": "master", "commit": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15" }, "nvim-scrollview": { "branch": "main", "commit": "5a7eb7e6c1b921761615b57a6140d73b1cc2b034" }, "nvim-spectre": { "branch": "master", "commit": "2b012554a2536465243c0dff3605b5927c49ed23" }, "nvim-tree.lua": { "branch": "master", "commit": "81eb8d519233c105f30dc0a278607e62b20502fd" }, "nvim-treehopper": { "branch": "master", "commit": "5a28bff46c05d28bdb4bcaef67e046eb915a9390" }, - "nvim-treesitter": { "branch": "master", "commit": "46b587eb38701c02360042fce284cc8ec2653c30" }, + "nvim-treesitter": { "branch": "master", "commit": "c16f66cca0c38b4e21371d8330b7f2ad6404f6dc" }, "nvim-treesitter-context": { "branch": "master", "commit": "f19766163c18515fb4d3c12d572bf9cba6cdb990" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "2aa454e4037424c678a8ff033951a5be39e54b9c" }, "nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "734ebad31c81c6198dfe102aa23280937c937c42" }, - "nvim-web-devicons": { "branch": "master", "commit": "20921d33c605ba24c8d0b76b379a54a9c83ba170" }, + "nvim-web-devicons": { "branch": "master", "commit": "6e355632387a085f15a66ad68cf681c1d7374a04" }, "paint.nvim": { "branch": "main", "commit": "6ce64212804f425073c61ab0d9c2b034f0435260" }, "persisted.nvim": { "branch": "main", "commit": "ca9900c31ee6e254a0ba7011ba49f48ebf4c8db2" }, "plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" }, @@ -80,7 +80,7 @@ "telescope-live-grep-args.nvim": { "branch": "master", "commit": "731a046da7dd3adff9de871a42f9b7fb85f60f47" }, "telescope-undo.nvim": { "branch": "main", "commit": "d19e2edc8b18d03283bd91f67310ac300ad003ce" }, "telescope-zoxide": { "branch": "main", "commit": "68966349aa1b8e9ade403e18479ecf79447389a7" }, - "telescope.nvim": { "branch": "master", "commit": "d26b666b45e5dde23332e4bde1227677f2d92e31" }, + "telescope.nvim": { "branch": "master", "commit": "5a701e99906961218b55d7ad6c2a998f066c6fe0" }, "todo-comments.nvim": { "branch": "main", "commit": "a7e39ae9e74f2c8c6dc4eea6d40c3971ae84752d" }, "toggleterm.nvim": { "branch": "main", "commit": "193786e0371e3286d3bc9aa0079da1cd41beaa62" }, "trouble.nvim": { "branch": "main", "commit": "b9cf677f20bb2faa2dacfa870b084e568dca9572" }, From 4ff443c6f1d567e14db60383c5b427e1131b4442 Mon Sep 17 00:00:00 2001 From: Mohu Date: Wed, 10 Apr 2024 13:28:23 +0800 Subject: [PATCH 06/15] docs: mention the experimental nature of the 0.10 branch (#1215) * docs: add note for 0.10 nightly branch in readme. Signed-off-by: ayamir * chore(issue_template): add nightly warning Signed-off-by: Charles Chiu * chore(issue_tempate): linting Signed-off-by: Charles Chiu * docs: update readme for 0.10 branch. Co-authored-by: Jint-lzxy <50296129+Jint-lzxy@users.noreply.github.com> Signed-off-by: Mohu * chore(issue_template): add nightly warning Signed-off-by: Charles Chiu * chore(issue_template): add nightly warning Signed-off-by: Charles Chiu --------- Signed-off-by: ayamir Signed-off-by: Charles Chiu Signed-off-by: Mohu Signed-off-by: Jint-lzxy <50296129+Jint-lzxy@users.noreply.github.com> Co-authored-by: Charles Chiu Co-authored-by: Jint-lzxy <50296129+Jint-lzxy@users.noreply.github.com> --- .github/ISSUE_TEMPLATE/bug_report.yml | 3 +++ .github/ISSUE_TEMPLATE/custom_config.yml | 5 ++++- .github/ISSUE_TEMPLATE/lsp_issue_report.yml | 3 +++ README.md | 3 +++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 0be5fc518..785f63ea0 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -6,6 +6,9 @@ body: attributes: value: | _Before reporting:_ Search [existing issues](https://github.com/ayamir/nvimdots/issues) and check the [FAQ](https://github.com/ayamir/nvimdots/wiki/Issues). Thank you for helping us improve! + > [!IMPORTANT] + > The `0.10` branch is intended for nightly neovim builds and is **not** stable. It typically harbors subtle issues scattered throughout. + > Therefore, refrain from submitting issues if you happen to encounter them. They will be closed directly unless a viable solution is proposed or included. - type: checkboxes id: is-latest-commit attributes: diff --git a/.github/ISSUE_TEMPLATE/custom_config.yml b/.github/ISSUE_TEMPLATE/custom_config.yml index 04eb02719..3f1f2d51c 100644 --- a/.github/ISSUE_TEMPLATE/custom_config.yml +++ b/.github/ISSUE_TEMPLATE/custom_config.yml @@ -6,7 +6,10 @@ body: attributes: value: | _Before requesting:_ Make sure you've read through our [Wiki: Usage](https://github.com/ayamir/nvimdots/wiki/Usage) before you start to add things to nvimdots! - + > [!IMPORTANT] + > The `0.10` branch is intended for nightly neovim builds and is **not** stable. It typically harbors subtle issues scattered throughout. + > Therefore, refrain from submitting issues if you happen to encounter them. They will be closed directly unless a viable solution is proposed or included. + - type: checkboxes id: is-latest-commit attributes: diff --git a/.github/ISSUE_TEMPLATE/lsp_issue_report.yml b/.github/ISSUE_TEMPLATE/lsp_issue_report.yml index 068800536..d320b0a83 100644 --- a/.github/ISSUE_TEMPLATE/lsp_issue_report.yml +++ b/.github/ISSUE_TEMPLATE/lsp_issue_report.yml @@ -6,6 +6,9 @@ body: attributes: value: | _Before reporting:_ Search [existing issues](https://github.com/ayamir/nvimdots/issues) and check the [FAQ](https://github.com/ayamir/nvimdots/wiki/Issues). Thank you for helping us improve! + > [!IMPORTANT] + > The `0.10` branch is intended for nightly neovim builds and is **not** stable. It typically harbors subtle issues scattered throughout. + > Therefore, refrain from submitting issues if you happen to encounter them. They will be closed directly unless a viable solution is proposed or included. - type: checkboxes id: is-latest-commit attributes: diff --git a/README.md b/README.md index 894b7bfa0..a7dd0e9c5 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,9 @@ Branch info: | 0.8 | nvim 0.8 | | 0.7 | nvim 0.7 | +> [!IMPORTANT] +> The `0.10` branch is intended for nightly neovim builds and is **not** stable. It typically harbors subtle issues scattered throughout. Therefore, refrain from submitting issues if you happen to encounter them. They will be closed directly unless a viable solution is proposed or included. + We currently manage plugins using [lazy.nvim](https://github.com/folke/lazy.nvim). From 5488b78973be899193f719665dfe2b6e5e2cd2a4 Mon Sep 17 00:00:00 2001 From: Jint-lzxy <50296129+Jint-lzxy@users.noreply.github.com> Date: Wed, 10 Apr 2024 13:30:58 +0800 Subject: [PATCH 07/15] fix(ISSUE_TEMPLATE): format code Signed-off-by: Jint-lzxy <50296129+Jint-lzxy@users.noreply.github.com> --- .github/ISSUE_TEMPLATE/bug_report.yml | 3 +-- .github/ISSUE_TEMPLATE/custom_config.yml | 4 +--- .github/ISSUE_TEMPLATE/lsp_issue_report.yml | 3 +-- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 785f63ea0..5c0f3fff4 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -7,8 +7,7 @@ body: value: | _Before reporting:_ Search [existing issues](https://github.com/ayamir/nvimdots/issues) and check the [FAQ](https://github.com/ayamir/nvimdots/wiki/Issues). Thank you for helping us improve! > [!IMPORTANT] - > The `0.10` branch is intended for nightly neovim builds and is **not** stable. It typically harbors subtle issues scattered throughout. - > Therefore, refrain from submitting issues if you happen to encounter them. They will be closed directly unless a viable solution is proposed or included. + > The `0.10` branch is intended for nightly neovim builds and is **not** stable. It typically harbors subtle issues scattered throughout. Therefore, refrain from submitting issues if you happen to encounter them. They will be closed directly unless a viable solution is proposed or included. - type: checkboxes id: is-latest-commit attributes: diff --git a/.github/ISSUE_TEMPLATE/custom_config.yml b/.github/ISSUE_TEMPLATE/custom_config.yml index 3f1f2d51c..d3dc98dd2 100644 --- a/.github/ISSUE_TEMPLATE/custom_config.yml +++ b/.github/ISSUE_TEMPLATE/custom_config.yml @@ -7,9 +7,7 @@ body: value: | _Before requesting:_ Make sure you've read through our [Wiki: Usage](https://github.com/ayamir/nvimdots/wiki/Usage) before you start to add things to nvimdots! > [!IMPORTANT] - > The `0.10` branch is intended for nightly neovim builds and is **not** stable. It typically harbors subtle issues scattered throughout. - > Therefore, refrain from submitting issues if you happen to encounter them. They will be closed directly unless a viable solution is proposed or included. - + > The `0.10` branch is intended for nightly neovim builds and is **not** stable. It typically harbors subtle issues scattered throughout. Therefore, refrain from submitting issues if you happen to encounter them. They will be closed directly unless a viable solution is proposed or included. - type: checkboxes id: is-latest-commit attributes: diff --git a/.github/ISSUE_TEMPLATE/lsp_issue_report.yml b/.github/ISSUE_TEMPLATE/lsp_issue_report.yml index d320b0a83..519b0e6de 100644 --- a/.github/ISSUE_TEMPLATE/lsp_issue_report.yml +++ b/.github/ISSUE_TEMPLATE/lsp_issue_report.yml @@ -7,8 +7,7 @@ body: value: | _Before reporting:_ Search [existing issues](https://github.com/ayamir/nvimdots/issues) and check the [FAQ](https://github.com/ayamir/nvimdots/wiki/Issues). Thank you for helping us improve! > [!IMPORTANT] - > The `0.10` branch is intended for nightly neovim builds and is **not** stable. It typically harbors subtle issues scattered throughout. - > Therefore, refrain from submitting issues if you happen to encounter them. They will be closed directly unless a viable solution is proposed or included. + > The `0.10` branch is intended for nightly neovim builds and is **not** stable. It typically harbors subtle issues scattered throughout. Therefore, refrain from submitting issues if you happen to encounter them. They will be closed directly unless a viable solution is proposed or included. - type: checkboxes id: is-latest-commit attributes: From e2ca3ec613aaf9918d9b246802e1450b6afce219 Mon Sep 17 00:00:00 2001 From: Jint-lzxy <50296129+Jint-lzxy@users.noreply.github.com> Date: Wed, 10 Apr 2024 13:33:31 +0800 Subject: [PATCH 08/15] fix(README): misplaced content Signed-off-by: Jint-lzxy <50296129+Jint-lzxy@users.noreply.github.com> --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a7dd0e9c5..05390439a 100644 --- a/README.md +++ b/README.md @@ -49,11 +49,11 @@ Branch info: | 0.8 | nvim 0.8 | | 0.7 | nvim 0.7 | + + > [!IMPORTANT] > The `0.10` branch is intended for nightly neovim builds and is **not** stable. It typically harbors subtle issues scattered throughout. Therefore, refrain from submitting issues if you happen to encounter them. They will be closed directly unless a viable solution is proposed or included. - - We currently manage plugins using [lazy.nvim](https://github.com/folke/lazy.nvim). Chinese introduction is [here](https://zhuanlan.zhihu.com/p/382092667). From 91dfb45deafb57f672d4457c05abd22053d03197 Mon Sep 17 00:00:00 2001 From: Charles Chiu Date: Wed, 10 Apr 2024 13:44:19 +0800 Subject: [PATCH 09/15] fix(todo-comment): add missing keywords (#1225) Signed-off-by: Charles Chiu --- lua/modules/configs/ui/todo.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/modules/configs/ui/todo.lua b/lua/modules/configs/ui/todo.lua index 1fbd248e2..bbd8af4b8 100644 --- a/lua/modules/configs/ui/todo.lua +++ b/lua/modules/configs/ui/todo.lua @@ -17,6 +17,7 @@ return function() WARN = { icon = icons.diagnostics.Warning, color = "warning", alt = { "WARNING", "XXX" } }, PERF = { icon = icons.ui.Perf, alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } }, NOTE = { icon = icons.ui.Note, color = "hint", alt = { "INFO" } }, + TEST = { icon = icons.ui.Lock, color = "test", alt = { "TESTING", "PASSED", "FAILED" } }, }, gui_style = { fg = "NONE", @@ -29,7 +30,7 @@ return function() after = "", comments_only = true, max_line_len = 500, - exclude = { "big_file_disabled_ft" }, + exclude = { "big_file_disabled_ft", "checkhealth" }, }, colors = { error = { "DiagnosticError", "ErrorMsg", "#DC2626" }, From a3a0d86d8203f309038ec089386a0bb0f5b0088d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 11 Apr 2024 01:48:19 +0000 Subject: [PATCH 10/15] chore(lockfile): auto update lazy-lock.json --- lazy-lock.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index ca4e35ad0..0d75ca58b 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -6,7 +6,7 @@ "autoclose.nvim": { "branch": "main", "commit": "dc42806540dcf448ecb2bad6b67204410cfbe629" }, "bigfile.nvim": { "branch": "main", "commit": "33eb067e3d7029ac77e081cfe7c45361887a311a" }, "bufferline.nvim": { "branch": "main", "commit": "64e2c5def50dfd6b6f14d96a45fa3d815a4a1eef" }, - "catppuccin": { "branch": "refactor/syntax-highlighting", "commit": "b6f54c74f8aea460b395c4b0ede9392dbab60424" }, + "catppuccin": { "branch": "refactor/syntax-highlighting", "commit": "bc04d9a1d32a52d14328c6d53d531b6c67c0a970" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-latex-symbols": { "branch": "main", "commit": "165fb66afdbd016eaa1570e41672c4c557b57124" }, "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, @@ -25,9 +25,9 @@ "fidget.nvim": { "branch": "main", "commit": "1ba38e4cbb24683973e00c2e36f53ae64da38ef5" }, "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" }, "friendly-snippets": { "branch": "main", "commit": "ea068f1becd91bcd4591fceb6420d4335e2e14d3" }, - "fzf": { "branch": "master", "commit": "17bb7ad2784afdfc99beeec9e0a58f8dae12748a" }, + "fzf": { "branch": "master", "commit": "a4745626dd5c5f697dbbc5e3aa1796d5016c1faf" }, "fzy-lua-native": { "branch": "master", "commit": "820f745b7c442176bcc243e8f38ef4b985febfaf" }, - "gitsigns.nvim": { "branch": "main", "commit": "1a50b94066def8591d5f65bd60a4233902e9def4" }, + "gitsigns.nvim": { "branch": "main", "commit": "c097cb255096f333e14d341082a84f572b394fa2" }, "glance.nvim": { "branch": "master", "commit": "51059bcf21016387b6233c89eed220cf47fca752" }, "hop.nvim": { "branch": "master", "commit": "6d853addd6e11df8338b26e869a29b36f2c3e893" }, "indent-blankline.nvim": { "branch": "master", "commit": "3d08501caef2329aba5121b753e903904088f7e6" }, @@ -60,9 +60,9 @@ "nvim-spectre": { "branch": "master", "commit": "2b012554a2536465243c0dff3605b5927c49ed23" }, "nvim-tree.lua": { "branch": "master", "commit": "81eb8d519233c105f30dc0a278607e62b20502fd" }, "nvim-treehopper": { "branch": "master", "commit": "5a28bff46c05d28bdb4bcaef67e046eb915a9390" }, - "nvim-treesitter": { "branch": "master", "commit": "c16f66cca0c38b4e21371d8330b7f2ad6404f6dc" }, + "nvim-treesitter": { "branch": "master", "commit": "2bad828b48aed74efe8f7e4ea15550e18c7b482d" }, "nvim-treesitter-context": { "branch": "master", "commit": "f19766163c18515fb4d3c12d572bf9cba6cdb990" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "2aa454e4037424c678a8ff033951a5be39e54b9c" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "67ac27f859ee3f7584f3edef81d0942bb61d5344" }, "nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "734ebad31c81c6198dfe102aa23280937c937c42" }, "nvim-web-devicons": { "branch": "master", "commit": "6e355632387a085f15a66ad68cf681c1d7374a04" }, From fd3eaa73ffc273eebe294cb4fef1c468c7807663 Mon Sep 17 00:00:00 2001 From: jint_lzxy_ <50296129+Jint-lzxy@users.noreply.github.com> Date: Thu, 11 Apr 2024 23:49:08 +0800 Subject: [PATCH 11/15] fix(options): remove options managed by `vim-sleuth` (#1229) Since all tab-related stuff is now managed by `vim-sleuth`, I think it is better to remove the relevant options to avoid confusion. Signed-off-by: Jint-lzxy <50296129+Jint-lzxy@users.noreply.github.com> --- lua/core/options.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/lua/core/options.lua b/lua/core/options.lua index efbd90129..b3b3e0295 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -28,7 +28,6 @@ local function load_options() encoding = "utf-8", equalalways = false, errorbells = true, - expandtab = true, fileformats = "unix,mac,dos", foldenable = true, foldlevelstart = 99, @@ -71,7 +70,6 @@ local function load_options() signcolumn = "yes", smartcase = true, smarttab = true, - softtabstop = 4, splitbelow = true, splitkeep = "screen", splitright = true, From 651a25962e2db53933cae8c0aeb917916e1a4174 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 12 Apr 2024 01:48:25 +0000 Subject: [PATCH 12/15] chore(lockfile): auto update lazy-lock.json --- lazy-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 0d75ca58b..89159ae63 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -53,14 +53,14 @@ "nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" }, "nvim-dap": { "branch": "master", "commit": "405df1dcc2e395ab5173a9c3d00e03942c023074" }, "nvim-dap-ui": { "branch": "master", "commit": "edfa93f60b189e5952c016eee262d0685d838450" }, - "nvim-lspconfig": { "branch": "master", "commit": "e25c4cdecd3d58c0deccce0f372426c8c480bcce" }, + "nvim-lspconfig": { "branch": "master", "commit": "b3014f2209503944f2714cf27c95591433a0c7d8" }, "nvim-nio": { "branch": "master", "commit": "5800f585def265d52f1d8848133217c800bcb25d" }, "nvim-notify": { "branch": "master", "commit": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15" }, "nvim-scrollview": { "branch": "main", "commit": "5a7eb7e6c1b921761615b57a6140d73b1cc2b034" }, "nvim-spectre": { "branch": "master", "commit": "2b012554a2536465243c0dff3605b5927c49ed23" }, "nvim-tree.lua": { "branch": "master", "commit": "81eb8d519233c105f30dc0a278607e62b20502fd" }, "nvim-treehopper": { "branch": "master", "commit": "5a28bff46c05d28bdb4bcaef67e046eb915a9390" }, - "nvim-treesitter": { "branch": "master", "commit": "2bad828b48aed74efe8f7e4ea15550e18c7b482d" }, + "nvim-treesitter": { "branch": "master", "commit": "b0ac1135fe304edd34e18204304906744db0fe63" }, "nvim-treesitter-context": { "branch": "master", "commit": "f19766163c18515fb4d3c12d572bf9cba6cdb990" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "67ac27f859ee3f7584f3edef81d0942bb61d5344" }, "nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" }, @@ -72,7 +72,7 @@ "project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" }, "rainbow-delimiters.nvim": { "branch": "master", "commit": "0563a31b1f46a911865cb85df3ddde2eff9fdada" }, "rustaceanvim": { "branch": "master", "commit": "bc8c4b8f7606d5b7c067cd8369e25c1a7ff77bd0" }, - "smart-splits.nvim": { "branch": "master", "commit": "50f52146e4504a3fc0f0d5830c8560a16a95dd08" }, + "smart-splits.nvim": { "branch": "master", "commit": "113d79d2fe3182e4dc9ac69047f185348c917f6b" }, "sniprun": { "branch": "master", "commit": "97daa506e2faa3939e0491642103635f9d22cd04" }, "suda.vim": { "branch": "master", "commit": "66727b416837836712975e748bc8a19fb6cf4ec3" }, "telescope-frecency.nvim": { "branch": "master", "commit": "94a532cb9c4713db83acf5432f5aadfd096e2af9" }, From 02814f8053c17f9c9974d34e883ce7e6a63bacff Mon Sep 17 00:00:00 2001 From: jint_lzxy_ <50296129+Jint-lzxy@users.noreply.github.com> Date: Wed, 17 Apr 2024 11:50:49 +0800 Subject: [PATCH 13/15] fix(rustaceanvim): use `init` for its config (#1231) Signed-off-by: Jint-lzxy <50296129+Jint-lzxy@users.noreply.github.com> --- lua/modules/plugins/lang.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/modules/plugins/lang.lua b/lua/modules/plugins/lang.lua index 77dacd97c..32e68efbe 100644 --- a/lua/modules/plugins/lang.lua +++ b/lua/modules/plugins/lang.lua @@ -18,7 +18,7 @@ lang["mrcjkb/rustaceanvim"] = { lazy = true, ft = "rust", version = "^3", - config = require("lang.rust"), + init = require("lang.rust"), dependencies = { "nvim-lua/plenary.nvim" }, } lang["Saecki/crates.nvim"] = { From 03099df72d24dc6d559536fb3376d366ab59f222 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 18 Apr 2024 01:47:57 +0000 Subject: [PATCH 14/15] chore(lockfile): auto update lazy-lock.json --- lazy-lock.json | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 89159ae63..b261aee2c 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,7 +1,7 @@ { "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, - "LuaSnip": { "branch": "master", "commit": "be7be2ca7f55bb881a7ffc16b2efa5af034ab06b" }, - "aerial.nvim": { "branch": "master", "commit": "24ebacab5821107c50f628e8e7774f105c08fe9b" }, + "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, + "aerial.nvim": { "branch": "master", "commit": "218eae4cb7099898b379aa0788c6e3b6a463a23d" }, "alpha-nvim": { "branch": "main", "commit": "41283fb402713fc8b327e60907f74e46166f4cfd" }, "autoclose.nvim": { "branch": "main", "commit": "dc42806540dcf448ecb2bad6b67204410cfbe629" }, "bigfile.nvim": { "branch": "main", "commit": "33eb067e3d7029ac77e081cfe7c45361887a311a" }, @@ -19,15 +19,15 @@ "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "copilot-cmp": { "branch": "master", "commit": "72fbaa03695779f8349be3ac54fa8bd77eed3ee3" }, "copilot.lua": { "branch": "master", "commit": "f7612f5af4a7d7615babf43ab1e67a2d790c13a6" }, - "crates.nvim": { "branch": "main", "commit": "e8fa8ec62ded43c3b06bca7ef36be26b924681bb" }, + "crates.nvim": { "branch": "main", "commit": "786d12a70c9b91fa2d0d102bb07df02be0db31a1" }, "csv.vim": { "branch": "master", "commit": "962f88787ec6873eba1c7dbbd81d2723f1ee3c4b" }, "diffview.nvim": { "branch": "main", "commit": "3dc498c9777fe79156f3d32dddd483b8b3dbd95f" }, "fidget.nvim": { "branch": "main", "commit": "1ba38e4cbb24683973e00c2e36f53ae64da38ef5" }, "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" }, "friendly-snippets": { "branch": "main", "commit": "ea068f1becd91bcd4591fceb6420d4335e2e14d3" }, - "fzf": { "branch": "master", "commit": "a4745626dd5c5f697dbbc5e3aa1796d5016c1faf" }, + "fzf": { "branch": "master", "commit": "d169c951f3abe95ac533864d3ce0515bcb89adce" }, "fzy-lua-native": { "branch": "master", "commit": "820f745b7c442176bcc243e8f38ef4b985febfaf" }, - "gitsigns.nvim": { "branch": "main", "commit": "c097cb255096f333e14d341082a84f572b394fa2" }, + "gitsigns.nvim": { "branch": "main", "commit": "52f8da33cc0cadbf1164c4a91c8bfd6895533d67" }, "glance.nvim": { "branch": "master", "commit": "51059bcf21016387b6233c89eed220cf47fca752" }, "hop.nvim": { "branch": "master", "commit": "6d853addd6e11df8338b26e869a29b36f2c3e893" }, "indent-blankline.nvim": { "branch": "master", "commit": "3d08501caef2329aba5121b753e903904088f7e6" }, @@ -43,50 +43,50 @@ "mason-nvim-dap.nvim": { "branch": "main", "commit": "67210c0e775adec55de9826b038e8b62de554afc" }, "mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" }, "mini.align": { "branch": "main", "commit": "f845218c5fea89e49074e48270dc5e1b9511a0f9" }, - "neoconf.nvim": { "branch": "main", "commit": "9d61ff423ae5f179ace1823300c4873f38a7c418" }, + "neoconf.nvim": { "branch": "main", "commit": "a7da418753379af428f5d26ac91aa6fc18baf86e" }, "neodim": { "branch": "master", "commit": "9477da03b93f1984a81fee3b92e6ac7c6ada6aa4" }, - "neoscroll.nvim": { "branch": "master", "commit": "21d52973bde32db998fc8b6590f87eb3c3c6d8e4" }, - "none-ls.nvim": { "branch": "main", "commit": "dca7ddec321a102ec9e792b1b29193702aff5fbb" }, + "neoscroll.nvim": { "branch": "master", "commit": "c48f15b11877df2cfc5c39666fb8a2524df13bec" }, + "none-ls.nvim": { "branch": "main", "commit": "09a7c58e9283dda582d9805f6b182b5b9f137ec7" }, "nvim-bqf": { "branch": "main", "commit": "52703d7adc3be3f7c09eea9a80c5b8caa615fb25" }, "nvim-bufdel": { "branch": "main", "commit": "523d58e94e7212fff3e05c247b962dc8f93bcfde" }, "nvim-cmp": { "branch": "main", "commit": "ce16de5665c766f39c271705b17fff06f7bcb84f" }, "nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" }, "nvim-dap": { "branch": "master", "commit": "405df1dcc2e395ab5173a9c3d00e03942c023074" }, "nvim-dap-ui": { "branch": "master", "commit": "edfa93f60b189e5952c016eee262d0685d838450" }, - "nvim-lspconfig": { "branch": "master", "commit": "b3014f2209503944f2714cf27c95591433a0c7d8" }, + "nvim-lspconfig": { "branch": "master", "commit": "9266dc26862d8f3556c2ca77602e811472b4c5b8" }, "nvim-nio": { "branch": "master", "commit": "5800f585def265d52f1d8848133217c800bcb25d" }, "nvim-notify": { "branch": "master", "commit": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15" }, "nvim-scrollview": { "branch": "main", "commit": "5a7eb7e6c1b921761615b57a6140d73b1cc2b034" }, - "nvim-spectre": { "branch": "master", "commit": "2b012554a2536465243c0dff3605b5927c49ed23" }, + "nvim-spectre": { "branch": "master", "commit": "9653847cf2f225648967f6e9363643e327387579" }, "nvim-tree.lua": { "branch": "master", "commit": "81eb8d519233c105f30dc0a278607e62b20502fd" }, "nvim-treehopper": { "branch": "master", "commit": "5a28bff46c05d28bdb4bcaef67e046eb915a9390" }, - "nvim-treesitter": { "branch": "master", "commit": "b0ac1135fe304edd34e18204304906744db0fe63" }, - "nvim-treesitter-context": { "branch": "master", "commit": "f19766163c18515fb4d3c12d572bf9cba6cdb990" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "67ac27f859ee3f7584f3edef81d0942bb61d5344" }, + "nvim-treesitter": { "branch": "master", "commit": "3e10cffbb2a022cd8e2aaea9f4fffb514065e77c" }, + "nvim-treesitter-context": { "branch": "master", "commit": "c24a7a6dc5fde325af844d165323aa6f7082866e" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "23b820146956b3b681c19e10d3a8bc0cbd9a1d4c" }, "nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" }, - "nvim-ts-context-commentstring": { "branch": "main", "commit": "734ebad31c81c6198dfe102aa23280937c937c42" }, - "nvim-web-devicons": { "branch": "master", "commit": "6e355632387a085f15a66ad68cf681c1d7374a04" }, + "nvim-ts-context-commentstring": { "branch": "main", "commit": "a6382f744f584bbf71d0a563af789af7190aabda" }, + "nvim-web-devicons": { "branch": "master", "commit": "b3468391470034353f0e5110c70babb5c62967d3" }, "paint.nvim": { "branch": "main", "commit": "6ce64212804f425073c61ab0d9c2b034f0435260" }, "persisted.nvim": { "branch": "main", "commit": "ca9900c31ee6e254a0ba7011ba49f48ebf4c8db2" }, "plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" }, "project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" }, "rainbow-delimiters.nvim": { "branch": "master", "commit": "0563a31b1f46a911865cb85df3ddde2eff9fdada" }, "rustaceanvim": { "branch": "master", "commit": "bc8c4b8f7606d5b7c067cd8369e25c1a7ff77bd0" }, - "smart-splits.nvim": { "branch": "master", "commit": "113d79d2fe3182e4dc9ac69047f185348c917f6b" }, + "smart-splits.nvim": { "branch": "master", "commit": "e11caebbe3ce8fb70aced281931f73519a060e0a" }, "sniprun": { "branch": "master", "commit": "97daa506e2faa3939e0491642103635f9d22cd04" }, - "suda.vim": { "branch": "master", "commit": "66727b416837836712975e748bc8a19fb6cf4ec3" }, + "suda.vim": { "branch": "master", "commit": "d0ccc1a5172f6a26182238767e60e08b931d11fa" }, "telescope-frecency.nvim": { "branch": "master", "commit": "94a532cb9c4713db83acf5432f5aadfd096e2af9" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" }, "telescope-live-grep-args.nvim": { "branch": "master", "commit": "731a046da7dd3adff9de871a42f9b7fb85f60f47" }, "telescope-undo.nvim": { "branch": "main", "commit": "d19e2edc8b18d03283bd91f67310ac300ad003ce" }, "telescope-zoxide": { "branch": "main", "commit": "68966349aa1b8e9ade403e18479ecf79447389a7" }, - "telescope.nvim": { "branch": "master", "commit": "5a701e99906961218b55d7ad6c2a998f066c6fe0" }, + "telescope.nvim": { "branch": "master", "commit": "d00d9df48c00d8682c14c2b5da78bda7ef06b939" }, "todo-comments.nvim": { "branch": "main", "commit": "a7e39ae9e74f2c8c6dc4eea6d40c3971ae84752d" }, "toggleterm.nvim": { "branch": "main", "commit": "193786e0371e3286d3bc9aa0079da1cd41beaa62" }, "trouble.nvim": { "branch": "main", "commit": "b9cf677f20bb2faa2dacfa870b084e568dca9572" }, "vim-cool": { "branch": "master", "commit": "662e7b11064cbeedad17c45d2fe926e78d3cd0b6" }, "vim-fugitive": { "branch": "master", "commit": "dac8e5c2d85926df92672bf2afb4fc48656d96c7" }, - "vim-go": { "branch": "master", "commit": "14eedf6135cf4253b0ed48a0b53d6834a40da1c4" }, + "vim-go": { "branch": "master", "commit": "feef9b31507f8e942bcd21f9e1f22d587c83c72d" }, "vim-matchup": { "branch": "master", "commit": "2d660e4aa7c566014c667af2cda0458043527902" }, "vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" }, "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }, From be008767d19c2171576e3a30a95448ec054b0a27 Mon Sep 17 00:00:00 2001 From: Mohu Date: Fri, 19 Apr 2024 18:01:35 +0800 Subject: [PATCH 15/15] feat!: improve go development experience (#1226) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(go): replace vim-go with go.nvim. Signed-off-by: ayamir * fix: install gopls by mason by default. Signed-off-by: ayamir * feat(keymap): set `n|gi` to goto implementation. Signed-off-by: ayamir * chore(keymap): use `gm` to jump to lsp implementations Co-authored-by: 冷酔閑吟 <50296129+Jint-lzxy@users.noreply.github.com> Signed-off-by: Mohu * fixup: remove unused `map_cu`. * chore: use gopls instead of null-ls to format. Signed-off-by: ayamir * chore: add notes for config options. Signed-off-by: ayamir * fixup: tidy settings for go.nvim and gopls. * docs: update more notes for how to config go.nvim. * chore: cleanup Signed-off-by: Jint-lzxy <50296129+Jint-lzxy@users.noreply.github.com> * fix: enable only the options that are truly necessary Signed-off-by: Jint-lzxy <50296129+Jint-lzxy@users.noreply.github.com> * fixup! chore: cleanup * fix(gopls): invalid config entry Signed-off-by: Jint-lzxy <50296129+Jint-lzxy@users.noreply.github.com> --------- Signed-off-by: ayamir Signed-off-by: Mohu Signed-off-by: Jint-lzxy <50296129+Jint-lzxy@users.noreply.github.com> Co-authored-by: 冷酔閑吟 <50296129+Jint-lzxy@users.noreply.github.com> Co-authored-by: neogtliu --- lua/core/settings.lua | 2 +- lua/keymap/completion.lua | 6 ++- .../configs/completion/mason-lspconfig.lua | 2 +- .../configs/completion/servers/gopls.lua | 48 ++++++++++++++++--- lua/modules/configs/lang/go.lua | 21 ++++++++ lua/modules/configs/lang/vim-go.lua | 7 --- lua/modules/plugins/lang.lua | 7 +-- 7 files changed, 73 insertions(+), 20 deletions(-) create mode 100644 lua/modules/configs/lang/go.lua delete mode 100644 lua/modules/configs/lang/vim-go.lua diff --git a/lua/core/settings.lua b/lua/core/settings.lua index 5a2890cae..1dca37a02 100644 --- a/lua/core/settings.lua +++ b/lua/core/settings.lua @@ -106,7 +106,7 @@ settings["lsp_deps"] = { "jsonls", "lua_ls", "pylsp", - -- "gopls", + "gopls", } -- Set the general-purpose servers that will be installed during bootstrap here. diff --git a/lua/keymap/completion.lua b/lua/keymap/completion.lua index 23e81b2bc..ae67e2aad 100644 --- a/lua/keymap/completion.lua +++ b/lua/keymap/completion.lua @@ -4,7 +4,7 @@ local map_cmd = bind.map_cmd local map_callback = bind.map_callback local plug_map = { - ["n|"] = map_cmd("FormatToggle"):with_noremap():with_desc("Formater: Toggle format on save"), + ["n|"] = map_cmd("FormatToggle"):with_noremap():with_desc("formatter: Toggle format on save"), } bind.nvim_load_mapping(plug_map) @@ -50,6 +50,10 @@ function mapping.lsp(buf) ["n|gd"] = map_cr("Glance definitions"):with_silent():with_buffer(buf):with_desc("lsp: Preview definition"), ["n|gD"] = map_cr("Lspsaga goto_definition"):with_silent():with_buffer(buf):with_desc("lsp: Goto definition"), ["n|gh"] = map_cr("Glance references"):with_silent():with_buffer(buf):with_desc("lsp: Show reference"), + ["n|gm"] = map_cr("Glance implementations") + :with_silent() + :with_buffer(buf) + :with_desc("lsp: Show implementation"), ["n|gci"] = map_cr("Lspsaga incoming_calls") :with_silent() :with_buffer(buf) diff --git a/lua/modules/configs/completion/mason-lspconfig.lua b/lua/modules/configs/completion/mason-lspconfig.lua index eb534cbf2..8885aaa2b 100644 --- a/lua/modules/configs/completion/mason-lspconfig.lua +++ b/lua/modules/configs/completion/mason-lspconfig.lua @@ -18,7 +18,7 @@ M.setup = function() virtual_text = diagnostics_virtual_text and { severity_limit = diagnostics_level, } or false, - -- set update_in_insert to false bacause it was enabled by lspsaga + -- set update_in_insert to false because it was enabled by lspsaga update_in_insert = false, }) diff --git a/lua/modules/configs/completion/servers/gopls.lua b/lua/modules/configs/completion/servers/gopls.lua index c5de67868..c05d1628f 100644 --- a/lua/modules/configs/completion/servers/gopls.lua +++ b/lua/modules/configs/completion/servers/gopls.lua @@ -1,15 +1,49 @@ -- https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig/server_configurations/gopls.lua return { - flags = { debounce_text_changes = 500 }, - cmd = { "gopls", "-remote=auto" }, + cmd = { "gopls", "-remote.debug=:0", "-remote=auto" }, + filetypes = { "go", "gomod", "gosum", "gotmpl", "gohtmltmpl", "gotexttmpl" }, + flags = { allow_incremental_sync = true, debounce_text_changes = 500 }, + capabilities = { + textDocument = { + completion = { + contextSupport = true, + dynamicRegistration = true, + completionItem = { + commitCharactersSupport = true, + deprecatedSupport = true, + preselectSupport = true, + insertReplaceSupport = true, + labelDetailsSupport = true, + snippetSupport = true, + documentationFormat = { "markdown", "plaintext" }, + resolveSupport = { + properties = { + "documentation", + "details", + "additionalTextEdits", + }, + }, + }, + }, + }, + }, settings = { gopls = { + staticcheck = true, + semanticTokens = true, + noSemanticString = true, usePlaceholders = true, - analyses = { - nilness = true, - shadow = true, - unusedparams = true, - unusewrites = true, + completeUnimported = true, + symbolMatcher = "Fuzzy", + buildFlags = { "-tags", "integration" }, + codelenses = { + generate = true, + gc_details = true, + test = true, + tidy = true, + vendor = true, + regenerate_cgo = true, + upgrade_dependency = true, }, }, }, diff --git a/lua/modules/configs/lang/go.lua b/lua/modules/configs/lang/go.lua new file mode 100644 index 000000000..8ca7b03de --- /dev/null +++ b/lua/modules/configs/lang/go.lua @@ -0,0 +1,21 @@ +return function() + require("modules.utils").load_plugin("go", { + -- By default, we've turned off these options to prevent clashes with our gopls config + icons = false, + diagnostic = false, + lsp_cfg = false, + lsp_gofumpt = false, + lsp_keymaps = false, + lsp_codelens = false, + lsp_document_formatting = false, + lsp_inlay_hints = { enable = false }, + -- DAP-related settings are also turned off here for the same reason + dap_debug = false, + dap_debug_keymap = false, + textobjects = false, + -- Miscellaneous options to seamlessly integrate with other plugins + trouble = true, + luasnip = false, + run_in_floaterm = false, + }) +end diff --git a/lua/modules/configs/lang/vim-go.lua b/lua/modules/configs/lang/vim-go.lua deleted file mode 100644 index f4279e367..000000000 --- a/lua/modules/configs/lang/vim-go.lua +++ /dev/null @@ -1,7 +0,0 @@ -return function() - vim.g.go_doc_keywordprg_enabled = 0 - vim.g.go_def_mapping_enabled = 0 - vim.g.go_code_completion_enabled = 0 - - require("modules.utils").load_plugin("vim-go", nil, true) -end diff --git a/lua/modules/plugins/lang.lua b/lua/modules/plugins/lang.lua index 32e68efbe..9075ff8f9 100644 --- a/lua/modules/plugins/lang.lua +++ b/lua/modules/plugins/lang.lua @@ -8,11 +8,12 @@ lang["kevinhwang91/nvim-bqf"] = { { "junegunn/fzf", build = ":call fzf#install()" }, }, } -lang["fatih/vim-go"] = { +lang["ray-x/go.nvim"] = { lazy = true, - ft = "go", + ft = { "go", "gomod", "gosum" }, build = ":GoInstallBinaries", - init = require("lang.vim-go"), + config = require("lang.go"), + dependencies = { "ray-x/guihua.lua" }, } lang["mrcjkb/rustaceanvim"] = { lazy = true,