Chaning leaderkey to ,

This commit is contained in:
Dimitar Ivanov 2023-09-05 15:32:17 +03:00 committed by Dimitar Ivanov
parent ae0e0b2446
commit d2aec6bc4c
2 changed files with 25 additions and 3 deletions

View File

@ -37,8 +37,7 @@ I hope you enjoy your Neovim journey,
P.S. You can delete this when you're done too. It's your config now :) P.S. You can delete this when you're done too. It's your config now :)
--]] --]]
-- Set , as the leader key, we are not heretics in this household
-- Set <space> as the leader key
-- See `:help mapleader` -- See `:help mapleader`
-- NOTE: Must happen before plugins are required (otherwise wrong leader will be used) -- NOTE: Must happen before plugins are required (otherwise wrong leader will be used)
vim.g.mapleader = ',' vim.g.mapleader = ','
@ -731,6 +730,25 @@ require('copilot').setup({
require('copilot_cmp').setup() require('copilot_cmp').setup()
-- Completion
local cmp = require("cmp")
cmp.setup({
mapping = {
["<CR>"] = cmp.mapping({
i = function(fallback)
if cmp.visible() and cmp.get_active_entry() then
cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = false })
else
fallback()
end
end,
s = cmp.mapping.confirm({ select = true }),
c = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true }),
}),
}
})
vim.api.nvim_set_keymap('n', '<Space>', 'za', { noremap = true, silent = true }) -- Indents vim.api.nvim_set_keymap('n', '<Space>', 'za', { noremap = true, silent = true }) -- Indents
-- Configure stuff for VimVista -- Configure stuff for VimVista
@ -743,7 +761,7 @@ vim.g.github_enterprise_urls = {
'https://github.wdf.sap.corp', 'github.tools.sap' 'https://github.wdf.sap.corp', 'github.tools.sap'
} }
-- Line at 80 -- Line at 100vim.opt.colorcolumn = "100"
vim.opt.colorcolumn = "100" vim.opt.colorcolumn = "100"
-- Set cursor according modes -- Set cursor according modes
@ -767,4 +785,7 @@ vim.keymap.set('n', '<leader>u', vim.cmd.UndotreeToggle)
vim.api.nvim_set_hl(0, "Normal", { bg = "none" }) vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" }) vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
-- Correct scroll level
vim.o.scrolloff = 8
-- vim: ts=2 sts=2 sw=2 et -- vim: ts=2 sts=2 sw=2 et

View File

@ -20,6 +20,7 @@ return {
-- Add your own debuggers here -- Add your own debuggers here
'leoluz/nvim-dap-go', 'leoluz/nvim-dap-go',
'mfussenegger/nvim-dap-python',
}, },
config = function() config = function()
local dap = require 'dap' local dap = require 'dap'