open terminal, but inside neovim now

This commit is contained in:
aliaksandrkotau 2024-01-01 15:07:06 +01:00
parent 91dbf1aceb
commit 3198f2870c
2 changed files with 19 additions and 4 deletions

View File

@ -10,6 +10,7 @@ def f(x: int) -> str:
d = f'Values {x=} {a=} {b=} {c=}' d = f'Values {x=} {a=} {b=} {c=}'
logging.error(d) logging.error(d)
logging.exception('FATAL!!!!!!!###!@#') logging.exception('FATAL!!!!!!!###!@#')
breakpoint()
return d return d

View File

@ -304,8 +304,8 @@ vim.o.smartcase = true
vim.wo.signcolumn = 'yes' vim.wo.signcolumn = 'yes'
-- Decrease update time -- Decrease update time
vim.o.updatetime = 150 vim.o.updatetime = 350
vim.o.timeoutlen = 100 vim.o.timeoutlen = 350
-- Set completeopt to have a better completion experience -- Set completeopt to have a better completion experience
vim.o.completeopt = 'menuone,noselect' vim.o.completeopt = 'menuone,noselect'
@ -612,13 +612,24 @@ mason_lspconfig.setup_handlers {
} }
-- [[ Configure nvim-cmp ]] -- [[ Configure nvim-cmp ]]
-- See `:help cmp` -- See `:help cmp`
local cmp = require 'cmp' local cmp = require 'cmp'
local luasnip = require 'luasnip' local luasnip = require 'luasnip'
require('luasnip.loaders.from_vscode').lazy_load() require('luasnip.loaders.from_vscode').lazy_load()
luasnip.config.setup {} luasnip.config.setup {}
cmp.setup { cmp.setup {
enabled = function()
-- disable completion in comments
local context = require 'cmp.config.context'
-- keep command mode completion enabled when cursor is in a comment
if vim.api.nvim_get_mode().mode == 'c' then
return true
else
return not context.in_treesitter_capture("comment")
and not context.in_syntax_group("Comment")
end
end,
snippet = { snippet = {
expand = function(args) expand = function(args)
luasnip.lsp_expand(args.body) luasnip.lsp_expand(args.body)
@ -707,6 +718,9 @@ vim.cmd [[
\ ['Open &Neotree', ':Neotree'], \ ['Open &Neotree', ':Neotree'],
\ ['&Vertical split', ':vsp'], \ ['&Vertical split', ':vsp'],
\ ['Ho&rizontal split', ':sp'], \ ['Ho&rizontal split', ':sp'],
\ ['--', ''],
\ ['Open &Terminal Right', ':botright vnew | terminal'],
\ ['Open Terminal &Down', ':belowright new | terminal'],
\ ]) \ ])
]] ]]
vim.cmd [[ vim.cmd [[
@ -763,7 +777,7 @@ vim.keymap.set('n', '<Leader>ds', function()
end) end)
-- Start Neovim in insert mode by default -- Start Neovim in insert mode by default
vim.cmd[[autocmd VimEnter * startinsert]] -- vim.cmd[[autocmd VimEnter * startinsert]]
-- Map <Esc> to toggle between normal and insert mode -- Map <Esc> to toggle between normal and insert mode
vim.api.nvim_set_keymap('n', '<Esc>', ':startinsert<CR>', { noremap = true, silent = true }) vim.api.nvim_set_keymap('n', '<Esc>', ':startinsert<CR>', { noremap = true, silent = true })
vim.api.nvim_set_keymap('i', '<Esc>', '<C-o>:stopinsert<CR>', { noremap = true, silent = true }) vim.api.nvim_set_keymap('i', '<Esc>', '<C-o>:stopinsert<CR>', { noremap = true, silent = true })