summaryrefslogtreecommitdiff
path: root/neovim/.config/nvim/lua
diff options
context:
space:
mode:
authorMichaël Ball <michael.ball@krotosaudio.com>2024-12-05 12:18:01 +0000
committerMichaël Ball <michael.ball@krotosaudio.com>2024-12-05 12:18:01 +0000
commita79097c60f697940351e8eb0721d77489664e79e (patch)
tree355d78bc64ad9f05bdbc53a72153ad3984ec0456 /neovim/.config/nvim/lua
parentae9586acc428c9699c845ed210d5181e8ec760a1 (diff)
Change diagnostic rendering settings
Diffstat (limited to 'neovim/.config/nvim/lua')
-rw-r--r--neovim/.config/nvim/lua/settings.lua29
1 files changed, 29 insertions, 0 deletions
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', '<D-s>', ':w<CR>') -- Save
+ vim.keymap.set('v', '<D-c>', '"+y') -- Copy
+ vim.keymap.set('n', '<D-v>', '"+P') -- Paste normal mode
+ vim.keymap.set('v', '<D-v>', '"+P') -- Paste visual mode
+ vim.keymap.set('c', '<D-v>', '<C-R>+') -- Paste command mode
+ vim.keymap.set('i', '<D-v>', '<ESC>l"+Pli') -- Paste insert mode
+end
+
+-- Allow clipboard copy paste in neovim
+vim.api.nvim_set_keymap('', '<D-v>', '+p<CR>', { noremap = true, silent = true})
+vim.api.nvim_set_keymap('!', '<D-v>', '<C-R>+', { noremap = true, silent = true})
+vim.api.nvim_set_keymap('t', '<D-v>', '<C-R>+', { noremap = true, silent = true})
+vim.api.nvim_set_keymap('v', '<D-v>', '<C-R>+', { 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', '<S-D-}>', '<cmd>tabn<CR>', { noremap = true, silent = true })
vim.keymap.set('v', '<S-D-}>', '<cmd>tabn<CR>', { noremap = true, silent = true })
vim.keymap.set('i', '<S-D-}>', '<Esc><cmd>tabn<CR>', { noremap = true, silent = true })
+ vim.keymap.set('n', '<M-S-{>', '<cmd>tabp<CR>', { noremap = true, silent = true })
+ vim.keymap.set('v', '<M-S-{>', '<cmd>tabp<CR>', { noremap = true, silent = true })
+ vim.keymap.set('i', '<M-S-{>', '<Esc><cmd>tabp<CR>', { noremap = true, silent = true })
+ vim.keymap.set('n', '<M-S-}>', '<cmd>tabn<CR>', { noremap = true, silent = true })
+ vim.keymap.set('v', '<M-S-}>', '<cmd>tabn<CR>', { noremap = true, silent = true })
+ vim.keymap.set('i', '<M-S-}>', '<Esc><cmd>tabn<CR>', { noremap = true, silent = true })
end
+
+vim.diagnostic.config({
+ underline = { severity = vim.diagnostic.severity.ERROR },
+})