mirror of
https://github.com/Baipyrus/nvim-config.git
synced 2024-12-26 05:11:45 +00:00
Compare commits
15 Commits
d315af770e
...
5137d4bbea
Author | SHA1 | Date | |
---|---|---|---|
5137d4bbea | |||
b93e5eeb7f | |||
9058853062 | |||
b111404bd0 | |||
a1ad7012fa | |||
b85dd68579 | |||
34882dc55f | |||
|
01a18a193d | ||
|
5aeddfdd5d | ||
|
bd53ce0190 | ||
|
b9bd02d55b | ||
|
f28bfcd7ac | ||
|
f86f18f27a | ||
|
9fb3891d63 | ||
|
6f6f38a6b5 |
@ -53,12 +53,20 @@ vim.keymap.set('n', '<leader>lo', '<cmd>copen<cr>', { desc = 'Quickfix [L]ist [O
|
|||||||
vim.keymap.set('n', '<C-S-j>', '<cmd>cnext<cr>')
|
vim.keymap.set('n', '<C-S-j>', '<cmd>cnext<cr>')
|
||||||
vim.keymap.set('n', '<C-S-k>', '<cmd>cprev<cr>')
|
vim.keymap.set('n', '<C-S-k>', '<cmd>cprev<cr>')
|
||||||
|
|
||||||
|
-- Resizing windows
|
||||||
|
vim.keymap.set({ 'n', 'v' }, '<M-,>', '<C-W><')
|
||||||
|
vim.keymap.set({ 'n', 'v' }, '<M-.>', '<C-W>>')
|
||||||
|
vim.keymap.set({ 'n', 'v' }, '<M-=>', '<C-W>+')
|
||||||
|
vim.keymap.set({ 'n', 'v' }, '<M-->', '<C-W>-')
|
||||||
|
|
||||||
if vim.g.neovide then
|
if vim.g.neovide then
|
||||||
-- System clipboard keybinds in normal and visual mode
|
-- System clipboard keybinds in normal and visual mode
|
||||||
vim.keymap.set({ 'n', 'v' }, '<C-S-C>', '"+y', { desc = 'Yank to System clipboard' })
|
vim.keymap.set({ 'n', 'v' }, '<C-S-c>', '"+y', { desc = 'Yank to System clipboard' })
|
||||||
vim.keymap.set({ 'n', 'i', 'v' }, '<C-S-V>', '"+p', { desc = 'Paste from System clipboard' })
|
vim.keymap.set({ 'n', 'v' }, '<C-S-v>', '"+p', { desc = 'Paste from System clipboard' })
|
||||||
|
-- Clipboard for insert mode
|
||||||
|
vim.keymap.set({ 'i' }, '<C-S-v>', '<Esc>"+pi', { desc = 'Paste from System clipboard' })
|
||||||
-- Clipboard for command mode
|
-- Clipboard for command mode
|
||||||
vim.keymap.set('c', '<C-S-V>', '<C-R>+', { desc = 'Paste from System clipboard' })
|
vim.keymap.set('c', '<C-S-v>', '<C-R>+', { desc = 'Paste from System clipboard' })
|
||||||
end
|
end
|
||||||
|
|
||||||
-- [[ Basic Autocommands ]]
|
-- [[ Basic Autocommands ]]
|
||||||
|
@ -14,15 +14,18 @@ return {
|
|||||||
-- Installs the debug adapters for you
|
-- Installs the debug adapters for you
|
||||||
'williamboman/mason.nvim',
|
'williamboman/mason.nvim',
|
||||||
'jay-babu/mason-nvim-dap.nvim',
|
'jay-babu/mason-nvim-dap.nvim',
|
||||||
|
|
||||||
|
-- Language specific debuggers
|
||||||
|
-- 'leoluz/nvim-dap-go',
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local dap = require 'dap'
|
local dap = require 'dap'
|
||||||
local dapui = require 'dapui'
|
local dapui = require 'dapui'
|
||||||
|
|
||||||
require('mason-nvim-dap').setup {
|
require('mason-nvim-dap').setup {
|
||||||
|
-- Makes a best effort to setup the various debuggers with
|
||||||
|
-- reasonable debug configurations
|
||||||
automatic_installation = true,
|
automatic_installation = true,
|
||||||
ensure_installed = {},
|
|
||||||
handlers = {},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Basic debugging keymaps, feel free to change to your liking!
|
-- Basic debugging keymaps, feel free to change to your liking!
|
||||||
@ -62,7 +65,13 @@ return {
|
|||||||
dap.listeners.before.event_exited['dapui_config'] = dapui.close
|
dap.listeners.before.event_exited['dapui_config'] = dapui.close
|
||||||
|
|
||||||
-- Install golang specific config
|
-- Install golang specific config
|
||||||
-- require('dap-go').setup()
|
-- require('dap-go').setup {
|
||||||
|
-- delve = {
|
||||||
|
-- -- On Windows delve must be run attached or it crashes.
|
||||||
|
-- -- See https://github.com/leoluz/nvim-dap-go/blob/main/README.md#configuring
|
||||||
|
-- detached = vim.fn.has 'win32' == 0,
|
||||||
|
-- },
|
||||||
|
-- }
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -120,6 +120,14 @@ return {
|
|||||||
group = highlight_augroup,
|
group = highlight_augroup,
|
||||||
callback = vim.lsp.buf.clear_references,
|
callback = vim.lsp.buf.clear_references,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd('LspDetach', {
|
||||||
|
group = vim.api.nvim_create_augroup('kickstart-lsp-detach', { clear = true }),
|
||||||
|
callback = function(event2)
|
||||||
|
vim.lsp.buf.clear_references()
|
||||||
|
vim.api.nvim_clear_autocmds { group = 'kickstart-lsp-highlight', buffer = event2.buf }
|
||||||
|
end,
|
||||||
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
-- The following autocommand is used to enable inlay hints in your
|
-- The following autocommand is used to enable inlay hints in your
|
||||||
@ -134,14 +142,6 @@ return {
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd('LspDetach', {
|
|
||||||
group = vim.api.nvim_create_augroup('kickstart-lsp-detach', { clear = true }),
|
|
||||||
callback = function(event)
|
|
||||||
vim.lsp.buf.clear_references()
|
|
||||||
vim.api.nvim_clear_autocmds { group = 'kickstart-lsp-highlight', buffer = event.buf }
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- LSP servers and clients are able to communicate to each other what features they support.
|
-- LSP servers and clients are able to communicate to each other what features they support.
|
||||||
-- By default, Neovim doesn't support everything that is in the LSP specification.
|
-- By default, Neovim doesn't support everything that is in the LSP specification.
|
||||||
-- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities.
|
-- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities.
|
||||||
|
@ -8,13 +8,14 @@ vim.api.nvim_exec2('language en_US', {})
|
|||||||
|
|
||||||
-- Shell options
|
-- Shell options
|
||||||
-- Sets the shell to use for system() and ! commands in windows
|
-- Sets the shell to use for system() and ! commands in windows
|
||||||
if vim.fn.has 'win32' then
|
if vim.fn.has 'win32' and vim.fn.has 'wsl' == 0 then
|
||||||
vim.opt.shell = 'powershell.exe'
|
vim.opt.shell = vim.fn.executable 'pwsh' == 1 and 'pwsh' or 'powershell'
|
||||||
vim.opt.shellcmdflag = '-NonInteractive -NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command '
|
vim.opt.shellcmdflag =
|
||||||
|
'-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;'
|
||||||
|
vim.opt.shellredir = '-RedirectStandardOutput %s -NoNewWindow -Wait'
|
||||||
|
vim.opt.shellpipe = '2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode'
|
||||||
vim.opt.shellxquote = ''
|
vim.opt.shellxquote = ''
|
||||||
vim.opt.shellquote = ''
|
vim.opt.shellquote = ''
|
||||||
vim.opt.shellredir = '2>&1 | Out-File -Encoding UTF8 %s'
|
|
||||||
vim.opt.shellpipe = '2>&1 | Out-File -Encoding UTF8 %s'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Format settings
|
-- Format settings
|
||||||
|
Loading…
Reference in New Issue
Block a user