UPD
This commit is contained in:
parent
0b1d7f80f2
commit
ea21f3506c
|
|
@ -1,4 +1,4 @@
|
||||||
-- [[ Keymaps ]]
|
-- [[ Basic Keymaps ]]
|
||||||
-- See `:help vim.keymap.set()`
|
-- See `:help vim.keymap.set()`
|
||||||
-- vim.keymap.set(<mode/s> required, <keymap> required, <command> required, <optoins> not required)
|
-- vim.keymap.set(<mode/s> required, <keymap> required, <command> required, <optoins> not required)
|
||||||
-- Set highlight on search, but clear on pressing <Esc> in normal mode
|
-- Set highlight on search, but clear on pressing <Esc> in normal mode
|
||||||
|
|
@ -58,9 +58,9 @@ vim.keymap.set('n', '<leader>k', ':m .-2<CR>==', { desc = 'Move line down in in
|
||||||
-- Window management
|
-- Window management
|
||||||
vim.keymap.set('n', '<C-C>', '<C-W><C-C>', { desc = 'Close window with ctrl+c' })
|
vim.keymap.set('n', '<C-C>', '<C-W><C-C>', { desc = 'Close window with ctrl+c' })
|
||||||
|
|
||||||
-- Markdown preview
|
-- Markdown preview haven't setup this plugin
|
||||||
vim.keymap.set('n', '<leader>mp', ':Glow<CR>', { desc = 'Remap glow to show markdown preview' })
|
-- vim.keymap.set('n', '<leader>mp', ':Glow<CR>', { desc = 'Remap glow to show markdown preview' })
|
||||||
vim.keymap.set('n', '<leader>mq', ':Glow!<CR>', { desc = 'Remap glow to close markdown preview' })
|
-- vim.keymap.set('n', '<leader>mq', ':Glow!<CR>', { desc = 'Remap glow to close markdown preview' })
|
||||||
|
|
||||||
-- Save file
|
-- Save file
|
||||||
vim.keymap.set({ 'i', 'v', 'n', 's' }, '<C-s>', '<cmd>w<cr><esc>', { desc = 'Save file' })
|
vim.keymap.set({ 'i', 'v', 'n', 's' }, '<C-s>', '<cmd>w<cr><esc>', { desc = 'Save file' })
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ require('lazy').setup({
|
||||||
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
|
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
|
||||||
-- Plugins with default values
|
-- Plugins with default values
|
||||||
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
|
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
|
||||||
'APZelos/blamer.nvim', -- Show git blame
|
|
||||||
'numToStr/Comment.nvim', -- "gc" to comment visual regions/lines
|
'numToStr/Comment.nvim', -- "gc" to comment visual regions/lines
|
||||||
|
|
||||||
-- One liners
|
-- One liners
|
||||||
|
|
@ -21,7 +20,7 @@ require('lazy').setup({
|
||||||
|
|
||||||
-- Plugins with custom values
|
-- Plugins with custom values
|
||||||
require 'plugins_config/which-key', -- Show created key bindings
|
require 'plugins_config/which-key', -- Show created key bindings
|
||||||
require 'plugins_config/gitsigns', -- Manage git signs
|
require 'plugins_config/gitsigns', -- Manage git signs, blame
|
||||||
require 'plugins_config/vim-fugitive', -- Manage git in nvim
|
require 'plugins_config/vim-fugitive', -- Manage git in nvim
|
||||||
require 'plugins_config/telescope', -- Manage searches nicely
|
require 'plugins_config/telescope', -- Manage searches nicely
|
||||||
require 'plugins_config/worktree', -- Manage worktrees from nvim
|
require 'plugins_config/worktree', -- Manage worktrees from nvim
|
||||||
|
|
|
||||||
|
|
@ -57,16 +57,15 @@ return { -- Autocompletion
|
||||||
['<C-n>'] = cmp.mapping.select_next_item(),
|
['<C-n>'] = cmp.mapping.select_next_item(),
|
||||||
-- Select the [p]revious item
|
-- Select the [p]revious item
|
||||||
['<C-p>'] = cmp.mapping.select_prev_item(),
|
['<C-p>'] = cmp.mapping.select_prev_item(),
|
||||||
|
|
||||||
-- Scroll the documentation window [b]ack / [f]orward
|
|
||||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
|
||||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
|
||||||
|
|
||||||
-- Accept ([y]es) the completion.
|
-- Accept ([y]es) the completion.
|
||||||
-- This will auto-import if your LSP supports it.
|
-- This will auto-import if your LSP supports it.
|
||||||
-- This will expand snippets if the LSP sent a snippet.
|
-- This will expand snippets if the LSP sent a snippet.
|
||||||
['<C-y>'] = cmp.mapping.confirm { select = true },
|
['<C-y>'] = cmp.mapping.confirm { select = true },
|
||||||
|
|
||||||
|
-- Scroll the documentation window [b]ack / [f]orward
|
||||||
|
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||||
|
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||||
|
|
||||||
-- If you prefer more traditional completion keymaps,
|
-- If you prefer more traditional completion keymaps,
|
||||||
-- you can uncomment the following lines
|
-- you can uncomment the following lines
|
||||||
--['<CR>'] = cmp.mapping.confirm { select = true },
|
--['<CR>'] = cmp.mapping.confirm { select = true },
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ return {
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require('harpoon').setup {}
|
require('harpoon').setup {}
|
||||||
-- local harpoon = require('harpoon')
|
|
||||||
local mark = require 'harpoon.mark'
|
local mark = require 'harpoon.mark'
|
||||||
local ui = require 'harpoon.ui'
|
local ui = require 'harpoon.ui'
|
||||||
--
|
--
|
||||||
|
|
|
||||||
|
|
@ -121,8 +121,8 @@ return {
|
||||||
-- This may be unwanted, since they displace some of your code
|
-- This may be unwanted, since they displace some of your code
|
||||||
if client and client.server_capabilities.inlayHintProvider and vim.lsp.inlay_hint then
|
if client and client.server_capabilities.inlayHintProvider and vim.lsp.inlay_hint then
|
||||||
map('<leader>th', function()
|
map('<leader>th', function()
|
||||||
vim.lsp.inlay_hint.enable(0, not vim.lsp.inlay_hint.is_enabled())
|
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
|
||||||
end, '[T]oggle Inlay [H]ints')
|
end, '[T]oggle Inlay [H]intsk ')
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
return {
|
return {
|
||||||
|
|
||||||
'ThePrimeagen/git-worktree.nvim', -- Manage worktrees from nvim
|
'ThePrimeagen/git-worktree.nvim', -- Manage worktrees from nvim
|
||||||
opts = {
|
opts = {
|
||||||
change_directory_command = 'tcd', -- command to change directory (e.g. lcd for NvimTree)
|
change_directory_command = 'tcd', -- command to change directory (e.g. lcd for NvimTree)
|
||||||
autopush = true,
|
autopush = true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue