Fix stuff

This commit is contained in:
Andreas Wachs 2023-08-22 13:04:53 +02:00
parent 52f48d1995
commit 4e1eff9b87
No known key found for this signature in database
GPG key ID: 46FF84123E7DCEAC
3 changed files with 48 additions and 17 deletions

View file

@ -71,5 +71,38 @@ vim.keymap.set("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><
-- Make current file executable
vim.keymap.set("n", "<leader>x", "<cmd>!chmod +x %<CR>", { silent = true, desc = "Make current file execuable"})
local format_sync_grp = vim.api.nvim_create_augroup("GoFormat", {})
vim.api.nvim_create_autocmd("BufWritePre", {
pattern = "*.go",
callback = function()
require('go.format').goimport()
end,
group = format_sync_grp,
})
return {
{
"ray-x/go.nvim",
dependencies = { -- optional packages
"ray-x/guihua.lua",
"neovim/nvim-lspconfig",
"nvim-treesitter/nvim-treesitter",
},
config = function()
require("go").setup()
end,
event = {"CmdlineEnter"},
ft = {"go", 'gomod'},
build = ':lua require("go.install").update_all_sync()' -- if you need to install/update all binaries
},
{
's1n7ax/nvim-window-picker',
name = 'window-picker',
event = 'VeryLazy',
version = '2.*',
config = function()
require'window-picker'.setup()
end,
}
}