From a79097c60f697940351e8eb0721d77489664e79e Mon Sep 17 00:00:00 2001 From: Michaƫl Ball Date: Thu, 5 Dec 2024 12:18:01 +0000 Subject: Change diagnostic rendering settings --- neovim/.config/nvim/lua/settings.lua | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'neovim/.config/nvim') diff --git a/neovim/.config/nvim/lua/settings.lua b/neovim/.config/nvim/lua/settings.lua index 4d3c601..ad8aaff 100644 --- a/neovim/.config/nvim/lua/settings.lua +++ b/neovim/.config/nvim/lua/settings.lua @@ -39,6 +39,25 @@ vim.opt.shortmess:append 'c' vim.opt.signcolumn = 'yes' vim.opt.laststatus = 3 +if vim.g.neovide then + vim.g.neovide_input_macos_option_key_is_meta = 'only_left' +end + +if vim.g.neovide then + vim.keymap.set('n', '', ':w') -- Save + vim.keymap.set('v', '', '"+y') -- Copy + vim.keymap.set('n', '', '"+P') -- Paste normal mode + vim.keymap.set('v', '', '"+P') -- Paste visual mode + vim.keymap.set('c', '', '+') -- Paste command mode + vim.keymap.set('i', '', 'l"+Pli') -- Paste insert mode +end + +-- Allow clipboard copy paste in neovim +vim.api.nvim_set_keymap('', '', '+p', { noremap = true, silent = true}) +vim.api.nvim_set_keymap('!', '', '+', { noremap = true, silent = true}) +vim.api.nvim_set_keymap('t', '', '+', { noremap = true, silent = true}) +vim.api.nvim_set_keymap('v', '', '+', { noremap = true, silent = true}) + -- Autocommands local indent_rules_augroup = vim.api.nvim_create_augroup('Indents', {}) @@ -144,4 +163,14 @@ if vim.fn.has('gui_running') == 1 then vim.keymap.set('n', '', 'tabn', { noremap = true, silent = true }) vim.keymap.set('v', '', 'tabn', { noremap = true, silent = true }) vim.keymap.set('i', '', 'tabn', { noremap = true, silent = true }) + vim.keymap.set('n', '', 'tabp', { noremap = true, silent = true }) + vim.keymap.set('v', '', 'tabp', { noremap = true, silent = true }) + vim.keymap.set('i', '', 'tabp', { noremap = true, silent = true }) + vim.keymap.set('n', '', 'tabn', { noremap = true, silent = true }) + vim.keymap.set('v', '', 'tabn', { noremap = true, silent = true }) + vim.keymap.set('i', '', 'tabn', { noremap = true, silent = true }) end + +vim.diagnostic.config({ + underline = { severity = vim.diagnostic.severity.ERROR }, +}) -- cgit v1.2.3