Compare commits

...

15 Commits

Author SHA1 Message Date
5137d4bbea better windows detection and fallback shell 2024-05-14 11:07:01 +02:00
b93e5eeb7f better powershell configuration 2024-05-14 11:01:52 +02:00
9058853062 comment out unused debugger 2024-05-14 10:41:37 +02:00
b111404bd0 Merge remote-tracking branch 'modular/master' 2024-05-14 10:37:17 +02:00
a1ad7012fa bugfix: extract insert-mode to separate keymap 2024-05-14 08:50:02 +02:00
b85dd68579 better keymap capitalization 2024-05-14 08:45:38 +02:00
34882dc55f resize window keymaps 2024-05-14 08:41:24 +02:00
Damjan 9000
01a18a193d Merge 'upstream' debug.lua: Automatically set detached state as needed. 2024-05-10 20:28:56 +02:00
Per Malmberg
5aeddfdd5d
Automatically set detached state as needed. (#925)
* Automatically set detached state as needed.

* Use vim.fn.has instead.

* Fix int vs bool.
2024-05-10 13:43:22 -04:00
Damjan 9000
bd53ce0190 Merge 'upstream' fix: debug.lua 2024-05-08 17:13:17 +02:00
Smig
b9bd02d55b
fix: debug.lua (#918) 2024-05-08 10:55:49 -04:00
Damjan 9000
f28bfcd7ac Merge 'upstream' Add diff to treesitter's ensure_installed languages 2024-05-06 09:13:48 +02:00
Richard Macklin
f86f18f27a
Add diff to treesitter's ensure_installed languages (#908) 2024-05-05 21:01:39 -04:00
Damjan 9000
9fb3891d63 Merge 'upstream' Move LspDetach handler near kickstart-lsp-highlight group 2024-05-03 00:11:56 +02:00
Damjan 9000
6f6f38a6b5
Move LspDetach handler near kickstart-lsp-highlight group (#900)
Moved to make sure the kickstart-lsp-highlight group exists when
the LspDetach handler is invoked. The LspDetach handler is used
to clean up any lsp highlights that were enabled by CursorHold
if the LSP is stopped or crashed.
2024-05-02 16:53:07 -04:00
4 changed files with 37 additions and 19 deletions

View File

@ -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-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
-- 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', 'i', 'v' }, '<C-S-V>', '"+p', { desc = 'Paste from System clipboard' })
vim.keymap.set({ 'n', 'v' }, '<C-S-c>', '"+y', { desc = 'Yank to 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
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
-- [[ Basic Autocommands ]]

View File

@ -14,15 +14,18 @@ return {
-- Installs the debug adapters for you
'williamboman/mason.nvim',
'jay-babu/mason-nvim-dap.nvim',
-- Language specific debuggers
-- 'leoluz/nvim-dap-go',
},
config = function()
local dap = require 'dap'
local dapui = require 'dapui'
require('mason-nvim-dap').setup {
-- Makes a best effort to setup the various debuggers with
-- reasonable debug configurations
automatic_installation = true,
ensure_installed = {},
handlers = {},
}
-- Basic debugging keymaps, feel free to change to your liking!
@ -62,7 +65,13 @@ return {
dap.listeners.before.event_exited['dapui_config'] = dapui.close
-- 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,
},
}

View File

@ -120,6 +120,14 @@ return {
group = highlight_augroup,
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
-- The following autocommand is used to enable inlay hints in your
@ -134,14 +142,6 @@ return {
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.
-- 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.

View File

@ -8,13 +8,14 @@ vim.api.nvim_exec2('language en_US', {})
-- Shell options
-- Sets the shell to use for system() and ! commands in windows
if vim.fn.has 'win32' then
vim.opt.shell = 'powershell.exe'
vim.opt.shellcmdflag = '-NonInteractive -NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command '
if vim.fn.has 'win32' and vim.fn.has 'wsl' == 0 then
vim.opt.shell = vim.fn.executable 'pwsh' == 1 and 'pwsh' or 'powershell'
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.shellquote = ''
vim.opt.shellredir = '2>&1 | Out-File -Encoding UTF8 %s'
vim.opt.shellpipe = '2>&1 | Out-File -Encoding UTF8 %s'
end
-- Format settings