mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-15 06:32:40 +00:00
Adds snippets to nvim
This commit is contained in:
@@ -38,5 +38,6 @@
|
|||||||
"telescope.nvim": { "branch": "0.1.x", "commit": "54930e1abfc94409e1bb9266e752ef8379008592" },
|
"telescope.nvim": { "branch": "0.1.x", "commit": "54930e1abfc94409e1bb9266e752ef8379008592" },
|
||||||
"toggleterm.nvim": { "branch": "main", "commit": "61e8ad370d4da5d84c77e31671027bc094ac06ca" },
|
"toggleterm.nvim": { "branch": "main", "commit": "61e8ad370d4da5d84c77e31671027bc094ac06ca" },
|
||||||
"which-key.nvim": { "branch": "main", "commit": "7ccf476ebe0445a741b64e36c78a682c1c6118b7" },
|
"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" }
|
||||||
}
|
}
|
||||||
@@ -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>gf", ":Telescope git_files<CR>", default_options)
|
||||||
keymap("n", "<leader>t", ":ToggleTerm<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.
|
-- Toggle term key maps, that get attached when terminal is opened.
|
||||||
function _G.set_terminal_keymaps()
|
function _G.set_terminal_keymaps()
|
||||||
local opts = { buffer = 0 }
|
local opts = { buffer = 0 }
|
||||||
|
|||||||
@@ -112,10 +112,10 @@ return {
|
|||||||
["<Tab>"] = cmp.mapping(function(fallback)
|
["<Tab>"] = cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
cmp.select_next_item()
|
cmp.select_next_item()
|
||||||
-- elseif luasnip.expandable() then
|
elseif luasnip.expandable() then
|
||||||
-- luasnip.expand()
|
luasnip.expand()
|
||||||
-- elseif luasnip.expand_or_jumpable() then
|
elseif luasnip.expand_or_jumpable() then
|
||||||
-- luasnip.expand_or_jump()
|
luasnip.expand_or_jump()
|
||||||
elseif has_words_before() then
|
elseif has_words_before() then
|
||||||
cmp.complete()
|
cmp.complete()
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -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>q", "<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>", opts)
|
||||||
buf_set_keymap("n", "<space>f", "<cmd>lua vim.lsp.buf.formatting()<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
|
end
|
||||||
|
|
||||||
-- Use a loop to conveniently call 'setup' on multiple servers and
|
-- Use a loop to conveniently call 'setup' on multiple servers and
|
||||||
@@ -109,7 +110,14 @@ return {
|
|||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
settings = {
|
settings = {
|
||||||
gopls = {analyses = {unusedparams = false}, staticcheck = true},
|
gopls = {
|
||||||
|
experimentalPostfixCompletions = true,
|
||||||
|
analyses = {
|
||||||
|
unusedparams = true,
|
||||||
|
shadow = true
|
||||||
|
},
|
||||||
|
staticcheck = true
|
||||||
|
},
|
||||||
lua_ls = {
|
lua_ls = {
|
||||||
Lua = {
|
Lua = {
|
||||||
completion = {
|
completion = {
|
||||||
|
|||||||
@@ -45,5 +45,9 @@ require("lazy").setup({
|
|||||||
{ import = 'user.plugin.toggleterm' },
|
{ import = 'user.plugin.toggleterm' },
|
||||||
{ import = 'user.plugin.which-key' },
|
{ import = 'user.plugin.which-key' },
|
||||||
{ import = 'user.plugin.wrapping' },
|
{ import = 'user.plugin.wrapping' },
|
||||||
|
{
|
||||||
|
"folke/zen-mode.nvim",
|
||||||
|
opts = { }
|
||||||
|
},
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -3,12 +3,8 @@
|
|||||||
session=${1}
|
session=${1}
|
||||||
|
|
||||||
if [ -z "$session" ]; then
|
if [ -z "$session" ]; then
|
||||||
session=$(tmux list-sessions -F \#S | gum filter --placeholder "Pick a session...")
|
choice=$(tmux list-sessions -F \#S | gum filter --placeholder "Pick a session...")
|
||||||
tmux switch-client -t "$session" || tmux attach -t "$session"
|
tmux switch-client -t "$choice" || tmux attach -t "$choice"
|
||||||
else
|
else
|
||||||
if [ ! -z "$(tmux list-sessions -F \#S | grep $session)" ]; then
|
tmux switch-client -t "$session" || tmux attach -t "$session"
|
||||||
tmux switch-client -t "$session" || tmux attach -t "$session"
|
|
||||||
else
|
|
||||||
echo "No session found for: $session"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user