Browse Source

feat: change the things

master
Tovi Jaeschke-Rogers 7 months ago
parent
commit
6e910eaaff
4 changed files with 42 additions and 15 deletions
  1. +9
    -9
      .config/nvim/lua/tovi/core/remaps.lua
  2. +5
    -1
      .config/nvim/lua/tovi/plugins/flash.lua
  3. +24
    -5
      .config/nvim/lua/tovi/plugins/nvim-cmp.lua
  4. +4
    -0
      .zshrc

+ 9
- 9
.config/nvim/lua/tovi/core/remaps.lua View File

@ -23,15 +23,15 @@ vim.keymap.set("v", "<", "<gv", { desc = "Keep highlight when indenting" })
vim.keymap.set("v", ">", ">gv", { desc = "Keep highlight when indenting" })
-- Easily navigate tabs
vim.keymap.set("n", "<A-1>", "1gt", { desc = "Navigate to tab 2" })
vim.keymap.set("n", "<A-2>", "2gt", { desc = "Navigate to tab 3" })
vim.keymap.set("n", "<A-3>", "3gt", { desc = "Navigate to tab 4" })
vim.keymap.set("n", "<A-4>", "4gt", { desc = "Navigate to tab 5" })
vim.keymap.set("n", "<A-5>", "5gt", { desc = "Navigate to tab 6" })
vim.keymap.set("n", "<A-6>", "6gt", { desc = "Navigate to tab 7" })
vim.keymap.set("n", "<A-7>", "7gt", { desc = "Navigate to tab 8" })
vim.keymap.set("n", "<A-8>", "8gt", { desc = "Navigate to tab 9" })
vim.keymap.set("n", "<A-9>", "9gt", { desc = "Navigate to tab 10" })
-- vim.keymap.set("n", "<A-1>", "1gt", { desc = "Navigate to tab 2" })
-- vim.keymap.set("n", "<A-2>", "2gt", { desc = "Navigate to tab 3" })
-- vim.keymap.set("n", "<A-3>", "3gt", { desc = "Navigate to tab 4" })
-- vim.keymap.set("n", "<A-4>", "4gt", { desc = "Navigate to tab 5" })
-- vim.keymap.set("n", "<A-5>", "5gt", { desc = "Navigate to tab 6" })
-- vim.keymap.set("n", "<A-6>", "6gt", { desc = "Navigate to tab 7" })
-- vim.keymap.set("n", "<A-7>", "7gt", { desc = "Navigate to tab 8" })
-- vim.keymap.set("n", "<A-8>", "8gt", { desc = "Navigate to tab 9" })
-- vim.keymap.set("n", "<A-9>", "9gt", { desc = "Navigate to tab 10" })
vim.keymap.set("n", "<leader>tN", "<cmd>tabnew<CR>", { desc = "New tab" })
vim.keymap.set("n", "<leader>tn", "<cmd>tabnext<CR>", { desc = "Next tab" })


+ 5
- 1
.config/nvim/lua/tovi/plugins/flash.lua View File

@ -2,7 +2,11 @@ return {
"folke/flash.nvim",
event = "VeryLazy",
---@type Flash.Config
opts = {},
opts = {
char = {
enabled = false,
}
},
-- stylua: ignore
keys = {
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },


+ 24
- 5
.config/nvim/lua/tovi/plugins/nvim-cmp.lua View File

@ -8,6 +8,7 @@ return {
"saadparwaiz1/cmp_luasnip", -- for autocompletion
"rafamadriz/friendly-snippets", -- useful snippets
"onsails/lspkind.nvim", -- vs-code like pictograms
"kristijanhusak/vim-dadbod-completion",
},
config = function()
local cmp = require("cmp")
@ -75,17 +76,35 @@ return {
-- sources for autocompletion
sources = cmp.config.sources({
{ name = "nvim_lsp" },
{ name = "luasnip" }, -- snippets
{ name = "buffer" }, -- text within current buffer
{ name = "path" }, -- file system paths
{ name = "luasnip" },
{ name = "buffer" },
{ name = "path" },
{ name = "vim-dadbod-completion" },
}),
-- configure lspkind for vs-code like pictograms in completion menu
formatting = {
format = lspkind.cmp_format({
maxwidth = 50,
ellipsis_char = "...",
mode = "symbol_text",
-- with_text = true,
menu = {
nvim_lua = "[api]",
nvim_lsp = "[LSP]",
luasnip = "[snip]",
vim_dadbod_completion = "[DB]",
path = "[path]",
buffer = "[Buffer]",
},
}),
},
event = {
on = {
CompleteChanged = function(data)
if data.entry then
vim.lsp.buf.hover()
end
end,
},
},
})
end,
}

+ 4
- 0
.zshrc View File

@ -104,3 +104,7 @@ if [[ $(uname) == 'Darwin' ]]; then
fi
source <(fzf --zsh)
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion

Loading…
Cancel
Save