diff options
| author | Gabriel A. Giovanini <g.giovanini@gridx.de> | 2025-10-16 17:29:12 +0200 |
|---|---|---|
| committer | Gabriel A. Giovanini <g.giovanini@gridx.de> | 2025-10-16 17:29:12 +0200 |
| commit | aac0e96aee64454f30032ee9ceb39ce0066b566d (patch) | |
| tree | 127f57240f706f36e1b02b15534ce4d7d27de078 | |
| parent | e1a6a6ac3799687bb44ca61799655e004bfb9899 (diff) | |
| download | gabrielgio.lua-aac0e96aee64454f30032ee9ceb39ce0066b566d.tar.gz gabrielgio.lua-aac0e96aee64454f30032ee9ceb39ce0066b566d.tar.bz2 gabrielgio.lua-aac0e96aee64454f30032ee9ceb39ce0066b566d.zip | |
Update some go shortcut
| -rw-r--r-- | init.lua | 23 | ||||
| -rw-r--r-- | lua/gabrielgio/ai.lua | 5 | ||||
| -rw-r--r-- | lua/gabrielgio/dap.lua | 5 | ||||
| -rw-r--r-- | lua/gabrielgio/go.lua | 5 | ||||
| -rw-r--r-- | lua/gabrielgio/init.lua | 1 | ||||
| -rw-r--r-- | lua/gabrielgio/lazy.lua | 6 | ||||
| -rw-r--r-- | lua/gabrielgio/lsp.lua | 1 | ||||
| -rw-r--r-- | lua/gabrielgio/so.lua | 4 |
8 files changed, 29 insertions, 21 deletions
@@ -25,7 +25,6 @@ local pkgs = { "mfussenegger/nvim-dap", -- add dap support "nvim-neotest/nvim-nio", -- async support library "rcarriga/nvim-dap-ui", -- dap ui - "leoluz/nvim-dap-go", -- dap go "nvim-lua/plenary.nvim", -- base lib "nvim-telescope/telescope.nvim", -- telescope "nvim-telescope/telescope-file-browser.nvim", -- telescope file browser @@ -36,8 +35,9 @@ local pkgs = { "mhartington/formatter.nvim", -- provider formatter "mfussenegger/nvim-lint", -- general linter "nvim-treesitter/nvim-treesitter-context", -- show context of where it is at the code + "theHamsta/nvim-dap-virtual-text", -- support lib from tree sitter "mbbill/undotree", -- keep track of undos - "simrat39/symbols-outline.nvim", -- symbols tree (lsp aware) + "hedyhli/outline.nvim", -- symbols tree (lsp aware) "akinsho/toggleterm.nvim", -- terminal "RRethy/vim-illuminate", -- hightlight use of the same word (lsp aware) "sainnhe/edge", -- light theme @@ -46,6 +46,7 @@ local pkgs = { "williamboman/mason-lspconfig.nvim", -- glue mason and lspconfig "neovim/nvim-lspconfig", -- lsp support "vimwiki/vimwiki", -- wiki + "ray-x/go.nvim", -- go things } -- stylua: ignore end @@ -57,14 +58,16 @@ add({ end, }, }) -add({ - source = "fatih/vim-go", - hooks = { - post_checkout = function() - vim.cmd("GoUpdateBinaries") - end, - }, -}) + +-- work related ai plugins +if vim.fn.executable("copilot") == 1 then + table.insert(pkgs, "github/copilot.vim") -- copilot +end + +if vim.fn.executable("claude") == 1 then + table.insert(pkgs, "coder/claudecode.nvim") -- claude +end + for _, value in ipairs(pkgs) do add({ source = value }) end diff --git a/lua/gabrielgio/ai.lua b/lua/gabrielgio/ai.lua new file mode 100644 index 0000000..08a49a6 --- /dev/null +++ b/lua/gabrielgio/ai.lua @@ -0,0 +1,5 @@ +local ok, claudecode = pcall(require, "claudecode") + +if ok then + claudecode.setup() +end diff --git a/lua/gabrielgio/dap.lua b/lua/gabrielgio/dap.lua index 4d55ca6..e4a2923 100644 --- a/lua/gabrielgio/dap.lua +++ b/lua/gabrielgio/dap.lua @@ -1,9 +1,6 @@ -local dap = require("dap") local key = require("gabrielgio.key") +local dap = require("dap") local dapui = require("dapui") -local dapgo = require("dap-go") - -dapgo.setup() key.nnoremap("<F5>", ":lua require'dap'.continue()<CR>") key.nnoremap("<F10>", ":lua require'dap'.step_over()<CR>") diff --git a/lua/gabrielgio/go.lua b/lua/gabrielgio/go.lua index e0b27b7..e95c641 100644 --- a/lua/gabrielgio/go.lua +++ b/lua/gabrielgio/go.lua @@ -1,11 +1,10 @@ local key = require("gabrielgio.key") +require("go").setup() + vim.g["go_def_mode"] = "gopls" vim.g["go_info_mode"] = "gopls" -key.nnoremap("<leader>r", ":GoReferrers<cr>") -key.nnoremap("<leader>a", ":GoAlternate<cr>") key.nnoremap("<leader>s", ":GoRename<cr>") -key.nnoremap("<leader>i", ":GoImplements<cr>") key.nnoremap("<leader>o", ":GoIfErr<cr>") key.nnoremap("<leader>gs", ":GoDebugStart .<cr>") key.nnoremap("<leader>gc", ":GoDebugContinue<cr>") diff --git a/lua/gabrielgio/init.lua b/lua/gabrielgio/init.lua index 2c146cf..fcdce8c 100644 --- a/lua/gabrielgio/init.lua +++ b/lua/gabrielgio/init.lua @@ -23,3 +23,4 @@ later(require_func("gabrielgio.trouble")) later(require_func("gabrielgio.dap")) later(require_func("gabrielgio.term")) later(require_func("gabrielgio.neovide")) +later(require_func("gabrielgio.ai")) diff --git a/lua/gabrielgio/lazy.lua b/lua/gabrielgio/lazy.lua index 1354b76..e8b76cc 100644 --- a/lua/gabrielgio/lazy.lua +++ b/lua/gabrielgio/lazy.lua @@ -3,17 +3,19 @@ require("gitblame").setup() require("neogit").setup() require("mason").setup() +require("nvim-dap-virtual-text").setup() +require("treesitter-context").setup() require("mason-lspconfig").setup({ ensure_installed = { "cssls", "emmet_ls", - "gopls", + -- "gopls", "html", "lua_ls", "pylsp", "rust_analyzer", "tsserver", "zls", - -- "clangd" not working on alpine + -- "clangd" not working on alpine }, }) diff --git a/lua/gabrielgio/lsp.lua b/lua/gabrielgio/lsp.lua index 36a3c25..3c169c4 100644 --- a/lua/gabrielgio/lsp.lua +++ b/lua/gabrielgio/lsp.lua @@ -10,6 +10,7 @@ local function on_attach(client, bufnr) set_key("n", "gd", vim.lsp.buf.definition, bufopts) set_key("n", "K", vim.lsp.buf.hover, bufopts) set_key("n", "gi", vim.lsp.buf.implementation, bufopts) + set_key("n", "gr", vim.lsp.buf.references, bufopts) set_key("n", "<C-s>", vim.lsp.buf.signature_help, bufopts) set_key("n", "<space>rn", vim.lsp.buf.declaration, bufopts) set_key("n", "<space>ca", vim.lsp.buf.code_action, bufopts) diff --git a/lua/gabrielgio/so.lua b/lua/gabrielgio/so.lua index df04319..d699646 100644 --- a/lua/gabrielgio/so.lua +++ b/lua/gabrielgio/so.lua @@ -1,6 +1,6 @@ local key = require("gabrielgio.key") -local symbols = require("symbols-outline") +local symbols = require("outline") -key.nnoremap("<leader>to", ":SymbolsOutline<cr>") +key.nnoremap("<leader>to", ":Outline<cr>") symbols.setup() |
