Adds snippets to nvim

This commit is contained in:
Michael Housh
2023-10-01 19:21:06 -04:00
parent e8772df72e
commit 19229a2b90
6 changed files with 25 additions and 13 deletions

View File

@@ -38,5 +38,6 @@
"telescope.nvim": { "branch": "0.1.x", "commit": "54930e1abfc94409e1bb9266e752ef8379008592" },
"toggleterm.nvim": { "branch": "main", "commit": "61e8ad370d4da5d84c77e31671027bc094ac06ca" },
"which-key.nvim": { "branch": "main", "commit": "7ccf476ebe0445a741b64e36c78a682c1c6118b7" },
"wrapping.nvim": { "branch": "master", "commit": "e1ce68aae5ea729fc20e5bc17fb569314f76b9bb" }
"wrapping.nvim": { "branch": "master", "commit": "e1ce68aae5ea729fc20e5bc17fb569314f76b9bb" },
"zen-mode.nvim": { "branch": "main", "commit": "68f554702de63f4b7b6b6d4bcb10178f41a0acc7" }
}

View File

@@ -37,6 +37,9 @@ 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)
-- Zen Mode Toggle
keymap('n', '<leader>z', "<cmd>:ZenMode<CR>", default_options)
-- Toggle term key maps, that get attached when terminal is opened.
function _G.set_terminal_keymaps()
local opts = { buffer = 0 }

View File

@@ -112,10 +112,10 @@ return {
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
-- elseif luasnip.expandable() then
-- luasnip.expand()
-- elseif luasnip.expand_or_jumpable() then
-- luasnip.expand_or_jump()
elseif luasnip.expandable() then
luasnip.expand()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
elseif has_words_before() then
cmp.complete()
else

View File

@@ -82,6 +82,7 @@ return {
buf_set_keymap("n", "<space>q", "<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>", opts)
buf_set_keymap("n", "<space>f", "<cmd>lua vim.lsp.buf.formatting()<CR>", opts)
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
end
-- Use a loop to conveniently call 'setup' on multiple servers and
@@ -109,7 +110,14 @@ return {
on_attach = on_attach,
capabilities = capabilities,
settings = {
gopls = {analyses = {unusedparams = false}, staticcheck = true},
gopls = {
experimentalPostfixCompletions = true,
analyses = {
unusedparams = true,
shadow = true
},
staticcheck = true
},
lua_ls = {
Lua = {
completion = {

View File

@@ -45,5 +45,9 @@ require("lazy").setup({
{ import = 'user.plugin.toggleterm' },
{ import = 'user.plugin.which-key' },
{ import = 'user.plugin.wrapping' },
{
"folke/zen-mode.nvim",
opts = { }
},
})