diff --git a/base.Dockerfile b/base.Dockerfile index aeaad2f..ff5edf3 100644 --- a/base.Dockerfile +++ b/base.Dockerfile @@ -41,6 +41,6 @@ RUN fish -c 'curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main # The "sleep *" is a workaround for https://github.com/nvim-treesitter/nvim-treesitter/issues/2900 RUN curl -L https://github.com/neovim/neovim/releases/download/stable/nvim-linux64.tar.gz | sudo tar zxf - -C /usr/local/ --strip-components=1 && \ nvim --headless +"Lazy restore" +"TSUpdateSync" +"MasonUpdate" \ - +"MasonInstall pyright" +"MasonInstall clangd" \ + +"MasonInstall pyright" +"MasonInstall black" +"MasonInstall clangd" \ +"sleep 20" +qall diff --git a/stow-dotfiles/nvim/.config/nvim/lazy-lock.json b/stow-dotfiles/nvim/.config/nvim/lazy-lock.json index 465e20b..cdcee0c 100644 --- a/stow-dotfiles/nvim/.config/nvim/lazy-lock.json +++ b/stow-dotfiles/nvim/.config/nvim/lazy-lock.json @@ -7,6 +7,8 @@ "fidget.nvim": { "branch": "legacy", "commit": "90c22e47be057562ee9566bad313ad42d622c1d3" }, "gitsigns.nvim": { "branch": "main", "commit": "5d73da785a3c05fd63ac31769079db05169a6ec7" }, "gruvbox": { "branch": "master", "commit": "bf2885a95efdad7bd5e4794dd0213917770d79b7" }, + "guard-collection": { "branch": "main", "commit": "41d4e036e350c44316c00eeaa651bb00ac24916f" }, + "guard.nvim": { "branch": "main", "commit": "71a5e4861fc65dd6298bdb6e6d3027e81c134708" }, "lazy.nvim": { "branch": "main", "commit": "dac844ed617dda4f9ec85eb88e9629ad2add5e05" }, "lsp_signature.nvim": { "branch": "master", "commit": "58d4e810801da74c29313da86075d6aea537501f" }, "lspkind.nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" }, diff --git a/stow-dotfiles/nvim/.config/nvim/lua/core/keybindings.lua b/stow-dotfiles/nvim/.config/nvim/lua/core/keybindings.lua index 1c75043..3929b6b 100644 --- a/stow-dotfiles/nvim/.config/nvim/lua/core/keybindings.lua +++ b/stow-dotfiles/nvim/.config/nvim/lua/core/keybindings.lua @@ -39,6 +39,9 @@ wk.register({ l = { name = 'Lazygit', }, + c = { + name = "Copy to clipboard", + }, }, { prefix = '' }) -- LSP Saga @@ -126,6 +129,9 @@ keymap("n", "gK", "Lspsaga hover_doc ++keep") -- keymap("n", "ci", "Lspsaga incoming_calls") -- keymap("n", "co", "Lspsaga outgoing_calls") +-- Format +keymap("n", "gf", "GuardFmt") + -- Floating terminal keymap({"n", "t"}, "", "Lspsaga term_toggle") diff --git a/stow-dotfiles/nvim/.config/nvim/lua/core/plugins.lua b/stow-dotfiles/nvim/.config/nvim/lua/core/plugins.lua index 6d41f7d..f7140d1 100644 --- a/stow-dotfiles/nvim/.config/nvim/lua/core/plugins.lua +++ b/stow-dotfiles/nvim/.config/nvim/lua/core/plugins.lua @@ -176,6 +176,31 @@ require('lazy').setup({ } }, }, + { + "nvimdev/guard.nvim", + -- Builtin configuration, optional + dependencies = { + "nvimdev/guard-collection", + }, + config = function() + local ft = require('guard.filetype') + -- -- Assuming you have guard-collection + -- ft('lang'):fmt('format-tool-1') + -- :append('format-tool-2') + -- :env(env_table) + -- :lint('lint-tool-1') + -- :extra(extra_args) + ft('python'):fmt('black') + + -- Call setup() LAST! + require('guard').setup({ + -- the only options for the setup function + fmt_on_save = false, + -- Use lsp if no formatter was defined for this filetype + lsp_as_default_formatter = true, + }) + end, + }, }, }, {