mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 14:12:41 +00:00
Added go.nvim, updated ts script to accept a session argument
This commit is contained in:
@@ -34,3 +34,14 @@ vim.api.nvim_create_autocmd(
|
||||
}
|
||||
)
|
||||
|
||||
vim.api.nvim_create_autocmd(
|
||||
"BufWritePre",
|
||||
{
|
||||
pattern = "*.go",
|
||||
callback = function()
|
||||
require('go.format').goimport()
|
||||
end,
|
||||
group = vim.api.nvim_create_augroup("GoFormat", { clear = true })
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -34,6 +34,8 @@ keymap("n", "<c-n>", "<CMD>:Neotree toggle<CR>", default_options)
|
||||
|
||||
-- Toggle Lazy Git
|
||||
keymap("n", '<leader>gg', ':LazyGit<CR>', default_options)
|
||||
keymap("n", "<leader>gf", ":Telescope git_files<CR>", default_options)
|
||||
keymap("n", "<leader>t", ":ToggleTerm<CR>", default_options)
|
||||
|
||||
-- Toggle term key maps, that get attached when terminal is opened.
|
||||
function _G.set_terminal_keymaps()
|
||||
|
||||
@@ -95,10 +95,10 @@ return {
|
||||
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<C-e>"] = cmp.mapping.close(),
|
||||
["<C-e>"] = cmp.mapping.abort(),
|
||||
["<CR>"] = cmp.mapping.confirm {
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = false
|
||||
select = true
|
||||
},
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
|
||||
15
nvim/m-housh/lua/user/plugin/go.lua
Normal file
15
nvim/m-housh/lua/user/plugin/go.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
return {
|
||||
"ray-x/go.nvim",
|
||||
lazy = true,
|
||||
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
|
||||
}
|
||||
@@ -14,7 +14,8 @@ return {
|
||||
"ray-x/lsp_signature.nvim",
|
||||
"neovim/nvim-lspconfig",
|
||||
"folke/neodev.nvim",
|
||||
"mhartington/formatter.nvim"
|
||||
"mhartington/formatter.nvim",
|
||||
"ray-x/go.nvim",
|
||||
},
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
|
||||
@@ -33,6 +33,7 @@ require("lazy").setup({
|
||||
{ import = 'user.plugin.lualine' },
|
||||
{ import = 'user.plugin.treesitter' },
|
||||
{ import = 'user.plugin.formatter' },
|
||||
{ import = 'user.plugin.go' },
|
||||
|
||||
-- Navigation --
|
||||
{ import = 'user.plugin.neo-tree' },
|
||||
|
||||
Reference in New Issue
Block a user