From d589b1e77e13d0155d1ec1574f28ba5befced178 Mon Sep 17 00:00:00 2001 From: KeeganForelight Date: Tue, 11 Apr 2023 15:13:44 -0400 Subject: [PATCH 01/14] trying to fix vim-go --- .gitmodules | 6 +++--- config/init.lua | 1 + {site/after/ftplugin => config/lua}/go.lua | 2 -- site/pack/golang/{opt => start}/vim-go | 0 4 files changed, 4 insertions(+), 5 deletions(-) rename {site/after/ftplugin => config/lua}/go.lua (88%) rename site/pack/golang/{opt => start}/vim-go (100%) diff --git a/.gitmodules b/.gitmodules index ced6b8f..e6da392 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,9 +7,6 @@ [submodule "telescope.nvim"] path = site/pack/filebrowser/start/telescope.nvim url = https://github.com/nvim-telescope/telescope.nvim.git -[submodule "vim-go"] - path = site/pack/golang/opt/vim-go - url = https://github.com/fatih/vim-go.git [submodule "markdown-preview.nvim"] path = site/pack/markdown/start/markdown-preview.nvim url = https://github.com/iamcco/markdown-preview.nvim.git @@ -40,3 +37,6 @@ [submodule "nvim-lspconfig"] path = site/pack/lsp/start/nvim-lspconfig url = https://github.com/neovim/nvim-lspconfig.git +[submodule "vim-go"] + path = site/pack/golang/start/vim-go + url = https://github.com/fatih/vim-go.git diff --git a/config/init.lua b/config/init.lua index 417bb9b..e77df17 100644 --- a/config/init.lua +++ b/config/init.lua @@ -2,6 +2,7 @@ require('keymap') require('plugins') require('calcurse') require('i3conf') +require('go') -- prevent cursor override vim.cmd('set guicursor=') diff --git a/site/after/ftplugin/go.lua b/config/lua/go.lua similarity index 88% rename from site/after/ftplugin/go.lua rename to config/lua/go.lua index 59c3b62..7165a05 100644 --- a/site/after/ftplugin/go.lua +++ b/config/lua/go.lua @@ -1,5 +1,3 @@ -vim.cmd('packadd vim-go') - vim.g.go_hightlight_types = 1 vim.g.go_hightlight_fields = 1 vim.g.go_hightlight_functions = 1 diff --git a/site/pack/golang/opt/vim-go b/site/pack/golang/start/vim-go similarity index 100% rename from site/pack/golang/opt/vim-go rename to site/pack/golang/start/vim-go From 63b960cad22cfd8d7f263ff239313c1d557c5f49 Mon Sep 17 00:00:00 2001 From: KeeganForelight Date: Tue, 11 Apr 2023 15:22:04 -0400 Subject: [PATCH 02/14] fixing go lsp client --- config/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/init.lua b/config/init.lua index e77df17..842b0d8 100644 --- a/config/init.lua +++ b/config/init.lua @@ -51,7 +51,7 @@ local lspconfig = require('lspconfig') -- Go lspconfig.gopls.setup{ - cmd = {"gopls", "server"}, + cmd = {"gopls", "serve"}, filetypes = {"go", "gomod"}, settings = { gopls = { From 88a520f7c035e54ff3d63a623de8b4a5c6a9b56f Mon Sep 17 00:00:00 2001 From: KeeganForelight Date: Thu, 13 Apr 2023 15:33:13 -0400 Subject: [PATCH 03/14] fixing virtual sort --- config/init.lua | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/config/init.lua b/config/init.lua index 842b0d8..dd1c528 100644 --- a/config/init.lua +++ b/config/init.lua @@ -87,6 +87,29 @@ lspconfig.pylsp.setup{} -- TypeScript lspconfig.tsserver.setup{} +-- Fix virtual text going off screen +vim.diagnostic.config({ + virtual_text = false, + signs = true, + underline = true, + update_in_insert = false, + severity_sort = true, +}) +vim.api.nvim_create_autocmd("CursorHold", { + buffer = bufnr, + callback = function() + local opts = { + focusable = false, + close_events = { "BufLeave", "CursorMoved", "InsertEnter", "FocusLost" }, + border = 'rounded', + source = 'always', + prefix = ' ', + scope = 'cursor', + } + vim.diagnostic.open_float(nil, opts) + end +}) + -- lsp mappingsd vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts) vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts) From fa7c2cb4d6cd7941d6536793f291cce2fba129e0 Mon Sep 17 00:00:00 2001 From: KeeganForelight Date: Thu, 13 Apr 2023 15:41:10 -0400 Subject: [PATCH 04/14] fixing diagnostic --- config/init.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config/init.lua b/config/init.lua index dd1c528..b9f8678 100644 --- a/config/init.lua +++ b/config/init.lua @@ -93,8 +93,11 @@ vim.diagnostic.config({ signs = true, underline = true, update_in_insert = false, - severity_sort = true, + severity_sort = false, }) + +vim.o.updatetime = 250 + vim.api.nvim_create_autocmd("CursorHold", { buffer = bufnr, callback = function() @@ -111,6 +114,7 @@ vim.api.nvim_create_autocmd("CursorHold", { }) -- lsp mappingsd +vim.keymap.set('n', 'e', vim.diagnostic.open_float, opts) vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts) vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts) vim.keymap.set('n', 'rn', vim.lsp.buf.rename, opts) From b79e6922fd0d9188bc811f52ed0ca158ff8d64df Mon Sep 17 00:00:00 2001 From: KeeganForelight Date: Thu, 13 Apr 2023 15:53:24 -0400 Subject: [PATCH 05/14] testing on_attach with golang --- config/init.lua | 64 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 45 insertions(+), 19 deletions(-) diff --git a/config/init.lua b/config/init.lua index b9f8678..29f6d1f 100644 --- a/config/init.lua +++ b/config/init.lua @@ -49,9 +49,40 @@ vim.cmd([[ -- language server setup local lspconfig = require('lspconfig') +local on_attach = function(_, bufnr) + -- key mappings + local opts = { + buffer = bufnr, + noremap = true, + silent = true, + focusable = false, + border = 'rounded', + source = 'always', + prefix = ' ', + scope = 'cursor', + close_events = { "BufLeave","CursorMoved","InsertEnter","FocusLost" }, + } + -- error viewing + vim.keymap.set('n', 'e', vim.diagnostic.open_float, opts) + vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts) + vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts) + -- def viewing/rename + vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts) + vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts) + vim.keymap.set('n', 'rn', vim.lsp.buf.rename, opts) + vim.keymap.set('n', 'H', vim.lsp.buf.hover, opts) + -- auto hover for error viewing + vim.api.nvim_create_autocmd("CursorHold", { + callback = function() + vim.diagnostic.open_float(nil, opts) + end + }) +end + -- Go lspconfig.gopls.setup{ cmd = {"gopls", "serve"}, + on_attach = on_attach, filetypes = {"go", "gomod"}, settings = { gopls = { @@ -98,24 +129,19 @@ vim.diagnostic.config({ vim.o.updatetime = 250 -vim.api.nvim_create_autocmd("CursorHold", { - buffer = bufnr, - callback = function() - local opts = { - focusable = false, - close_events = { "BufLeave", "CursorMoved", "InsertEnter", "FocusLost" }, - border = 'rounded', - source = 'always', - prefix = ' ', - scope = 'cursor', - } - vim.diagnostic.open_float(nil, opts) - end +vim.api.nvim_create_autocmd('LspAttach', { + callback = function(ev) + local opts = { buffer = ev.buf } + -- error viewing + vim.keymap.set('n', 'e', vim.diagnostic.open_float, opts) + vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts) + vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts) + -- def viewing/rename + vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts) + vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts) + vim.keymap.set('n', 'rn', vim.lsp.buf.rename, opts) + vim.keymap.set('n', 'H', vim.lsp.buf.hover, opts) + end, }) --- lsp mappingsd -vim.keymap.set('n', 'e', vim.diagnostic.open_float, opts) -vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts) -vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts) -vim.keymap.set('n', 'rn', vim.lsp.buf.rename, opts) -vim.keymap.set('n', 'H', vim.lsp.buf.hover, opts) + From 12fe2e2c74184720ac4bd5dbbee1ef2f39c3a910 Mon Sep 17 00:00:00 2001 From: KeeganForelight Date: Thu, 13 Apr 2023 16:00:24 -0400 Subject: [PATCH 06/14] testing autocmd --- config/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/init.lua b/config/init.lua index 29f6d1f..e704faa 100644 --- a/config/init.lua +++ b/config/init.lua @@ -49,12 +49,13 @@ vim.cmd([[ -- language server setup local lspconfig = require('lspconfig') +vim.o.updatetime = 250 + local on_attach = function(_, bufnr) -- key mappings local opts = { buffer = bufnr, noremap = true, - silent = true, focusable = false, border = 'rounded', source = 'always', @@ -127,7 +128,6 @@ vim.diagnostic.config({ severity_sort = false, }) -vim.o.updatetime = 250 vim.api.nvim_create_autocmd('LspAttach', { callback = function(ev) From 06aeca8dfdb06d5d5213a492ea5266b030f148b6 Mon Sep 17 00:00:00 2001 From: KeeganForelight Date: Thu, 13 Apr 2023 16:04:27 -0400 Subject: [PATCH 07/14] testing on_attach --- config/init.lua | 45 +++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/config/init.lua b/config/init.lua index e704faa..cd37ed9 100644 --- a/config/init.lua +++ b/config/init.lua @@ -96,10 +96,13 @@ lspconfig.gopls.setup{ } -- C/C++ -lspconfig.clangd.setup{} +lspconfig.clangd.setup{ + on_attach = on_attach, +} -- Lua lspconfig.lua_ls.setup{ + on_attach = on_attach, settings = { Lua = { diagnostics = {globals = {'vim', 'opts'}}, @@ -111,13 +114,19 @@ lspconfig.lua_ls.setup{ } -- Rust -lspconfig.rust_analyzer.setup{} +lspconfig.rust_analyzer.setup{ + on_attach = on_attach, +} -- Python -lspconfig.pylsp.setup{} +lspconfig.pylsp.setup{ + on_attach = on_attach, +} -- TypeScript -lspconfig.tsserver.setup{} +lspconfig.tsserver.setup{ + on_attach = on_attach, +} -- Fix virtual text going off screen vim.diagnostic.config({ @@ -129,19 +138,19 @@ vim.diagnostic.config({ }) -vim.api.nvim_create_autocmd('LspAttach', { - callback = function(ev) - local opts = { buffer = ev.buf } - -- error viewing - vim.keymap.set('n', 'e', vim.diagnostic.open_float, opts) - vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts) - vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts) - -- def viewing/rename - vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts) - vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts) - vim.keymap.set('n', 'rn', vim.lsp.buf.rename, opts) - vim.keymap.set('n', 'H', vim.lsp.buf.hover, opts) - end, -}) +-- vim.api.nvim_create_autocmd('LspAttach', { +-- callback = function(ev) +-- local opts = { buffer = ev.buf } +-- -- error viewing +-- vim.keymap.set('n', 'e', vim.diagnostic.open_float, opts) +-- vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts) +-- vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts) +-- -- def viewing/rename +-- vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts) +-- vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts) +-- vim.keymap.set('n', 'rn', vim.lsp.buf.rename, opts) +-- vim.keymap.set('n', 'H', vim.lsp.buf.hover, opts) +-- end, +-- }) From 34ed925a02e2643792a976c228015b29341ef7bb Mon Sep 17 00:00:00 2001 From: KeeganForelight Date: Thu, 13 Apr 2023 16:12:37 -0400 Subject: [PATCH 08/14] testing regular lsp attach --- config/init.lua | 130 +++++++++++++++++++++++++++--------------------- 1 file changed, 72 insertions(+), 58 deletions(-) diff --git a/config/init.lua b/config/init.lua index cd37ed9..d240131 100644 --- a/config/init.lua +++ b/config/init.lua @@ -51,39 +51,38 @@ local lspconfig = require('lspconfig') vim.o.updatetime = 250 -local on_attach = function(_, bufnr) - -- key mappings - local opts = { - buffer = bufnr, - noremap = true, - focusable = false, - border = 'rounded', - source = 'always', - prefix = ' ', - scope = 'cursor', - close_events = { "BufLeave","CursorMoved","InsertEnter","FocusLost" }, - } - -- error viewing - vim.keymap.set('n', 'e', vim.diagnostic.open_float, opts) - vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts) - vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts) - -- def viewing/rename - vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts) - vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts) - vim.keymap.set('n', 'rn', vim.lsp.buf.rename, opts) - vim.keymap.set('n', 'H', vim.lsp.buf.hover, opts) - -- auto hover for error viewing - vim.api.nvim_create_autocmd("CursorHold", { - callback = function() - vim.diagnostic.open_float(nil, opts) - end - }) -end +-- local on_attach = function(client, bufnr) +-- -- key mappings +-- local opts = { +-- buffer = bufnr, +-- noremap = true, +-- focusable = false, +-- border = 'rounded', +-- source = 'always', +-- prefix = ' ', +-- scope = 'cursor', +-- close_events = { "BufLeave","CursorMoved","InsertEnter","FocusLost" }, +-- } +-- -- error viewing +-- vim.keymap.set('n', 'e', vim.diagnostic.open_float, opts) +-- vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts) +-- vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts) +-- -- def viewing/rename +-- vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts) +-- vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts) +-- vim.keymap.set('n', 'rn', vim.lsp.buf.rename, opts) +-- vim.keymap.set('n', 'H', vim.lsp.buf.hover, opts) +-- -- auto hover for error viewing +-- vim.api.nvim_create_autocmd("CursorHold", { +-- callback = function() +-- vim.diagnostic.open_float(nil, opts) +-- end +-- }) +-- end -- Go lspconfig.gopls.setup{ cmd = {"gopls", "serve"}, - on_attach = on_attach, filetypes = {"go", "gomod"}, settings = { gopls = { @@ -96,13 +95,10 @@ lspconfig.gopls.setup{ } -- C/C++ -lspconfig.clangd.setup{ - on_attach = on_attach, -} +lspconfig.clangd.setup{} -- Lua lspconfig.lua_ls.setup{ - on_attach = on_attach, settings = { Lua = { diagnostics = {globals = {'vim', 'opts'}}, @@ -114,19 +110,13 @@ lspconfig.lua_ls.setup{ } -- Rust -lspconfig.rust_analyzer.setup{ - on_attach = on_attach, -} +lspconfig.rust_analyzer.setup{} -- Python -lspconfig.pylsp.setup{ - on_attach = on_attach, -} +lspconfig.pylsp.setup{} -- TypeScript -lspconfig.tsserver.setup{ - on_attach = on_attach, -} +lspconfig.tsserver.setup{} -- Fix virtual text going off screen vim.diagnostic.config({ @@ -138,19 +128,43 @@ vim.diagnostic.config({ }) --- vim.api.nvim_create_autocmd('LspAttach', { --- callback = function(ev) --- local opts = { buffer = ev.buf } --- -- error viewing --- vim.keymap.set('n', 'e', vim.diagnostic.open_float, opts) --- vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts) --- vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts) --- -- def viewing/rename --- vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts) --- vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts) --- vim.keymap.set('n', 'rn', vim.lsp.buf.rename, opts) --- vim.keymap.set('n', 'H', vim.lsp.buf.hover, opts) --- end, --- }) - - +vim.api.nvim_create_autocmd('LspAttach', { + callback = function(ev) + -- key mappings + local opts = { + buffer = ev.buf, + noremap = true, + focusable = false, + border = 'rounded', + source = 'always', + prefix = ' ', + scope = 'cursor', + close_events = { "BufLeave","CursorMoved","InsertEnter","FocusLost" }, + } + -- error viewing + vim.keymap.set('n', 'e', vim.diagnostic.open_float, opts) + vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts) + vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts) + -- def viewing/rename + vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts) + vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts) + vim.keymap.set('n', 'rn', vim.lsp.buf.rename, opts) + vim.keymap.set('n', 'H', vim.lsp.buf.hover, opts) + -- auto hover for error viewing + vim.api.nvim_create_autocmd("CursorHold", { + callback = function() + vim.diagnostic.open_float(nil, opts) + end + }) + -- local opts = { buffer = ev.buf } + -- -- error viewing + -- vim.keymap.set('n', 'e', vim.diagnostic.open_float, opts) + -- vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts) + -- vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts) + -- -- def viewing/rename + -- vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts) + -- vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts) + -- vim.keymap.set('n', 'rn', vim.lsp.buf.rename, opts) + -- vim.keymap.set('n', 'H', vim.lsp.buf.hover, opts) + end, +}) From be9bd648b87fb0f6e1695c765a2a057244ec16e5 Mon Sep 17 00:00:00 2001 From: KeeganForelight Date: Thu, 13 Apr 2023 16:14:44 -0400 Subject: [PATCH 09/14] testing regular lsp attach --- config/init.lua | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/config/init.lua b/config/init.lua index d240131..3b39445 100644 --- a/config/init.lua +++ b/config/init.lua @@ -133,13 +133,6 @@ vim.api.nvim_create_autocmd('LspAttach', { -- key mappings local opts = { buffer = ev.buf, - noremap = true, - focusable = false, - border = 'rounded', - source = 'always', - prefix = ' ', - scope = 'cursor', - close_events = { "BufLeave","CursorMoved","InsertEnter","FocusLost" }, } -- error viewing vim.keymap.set('n', 'e', vim.diagnostic.open_float, opts) @@ -152,10 +145,20 @@ vim.api.nvim_create_autocmd('LspAttach', { vim.keymap.set('n', 'H', vim.lsp.buf.hover, opts) -- auto hover for error viewing vim.api.nvim_create_autocmd("CursorHold", { - callback = function() - vim.diagnostic.open_float(nil, opts) - end - }) + opts = { + buffer = ev.buf, + noremap = true, + focusable = false, + border = 'rounded', + source = 'always', + prefix = ' ', + scope = 'cursor', + close_events = { "BufLeave","CursorMoved","InsertEnter","FocusLost" } + }, + callback = function() + vim.diagnostic.open_float(nil, opts) + end + }) -- local opts = { buffer = ev.buf } -- -- error viewing -- vim.keymap.set('n', 'e', vim.diagnostic.open_float, opts) From e9628aa329c3a67e79c3c2b3b32e2a63c5df9603 Mon Sep 17 00:00:00 2001 From: KeeganForelight Date: Thu, 13 Apr 2023 16:20:17 -0400 Subject: [PATCH 10/14] testing regular lsp attach --- config/init.lua | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/config/init.lua b/config/init.lua index 3b39445..2de2830 100644 --- a/config/init.lua +++ b/config/init.lua @@ -131,9 +131,7 @@ vim.diagnostic.config({ vim.api.nvim_create_autocmd('LspAttach', { callback = function(ev) -- key mappings - local opts = { - buffer = ev.buf, - } + local opts = { buffer = ev.buf,} -- error viewing vim.keymap.set('n', 'e', vim.diagnostic.open_float, opts) vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts) @@ -145,20 +143,19 @@ vim.api.nvim_create_autocmd('LspAttach', { vim.keymap.set('n', 'H', vim.lsp.buf.hover, opts) -- auto hover for error viewing vim.api.nvim_create_autocmd("CursorHold", { - opts = { - buffer = ev.buf, - noremap = true, - focusable = false, - border = 'rounded', - source = 'always', - prefix = ' ', - scope = 'cursor', - close_events = { "BufLeave","CursorMoved","InsertEnter","FocusLost" } - }, - callback = function() - vim.diagnostic.open_float(nil, opts) - end - }) + callback = function() + opts = { + buffer = ev.buf, + focusable = false, + border = 'rounded', + source = 'always', + prefix = ' ', + scope = 'cursor', + close_events = { "BufLeave","CursorMoved","InsertEnter","FocusLost" }, + } + vim.diagnostic.open_float(nil, opts) + end + }) -- local opts = { buffer = ev.buf } -- -- error viewing -- vim.keymap.set('n', 'e', vim.diagnostic.open_float, opts) From 65a5e27bb8b62f39388dc43a1e8b785babfe3465 Mon Sep 17 00:00:00 2001 From: KeeganForelight Date: Thu, 13 Apr 2023 16:36:41 -0400 Subject: [PATCH 11/14] reverted to cursor only instead of line --- config/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/init.lua b/config/init.lua index 2de2830..f3a9a22 100644 --- a/config/init.lua +++ b/config/init.lua @@ -34,6 +34,7 @@ Transparent = true -- timeouts vim.opt.ttimeout = true vim.opt.ttimeoutlen = 100 +vim.o.updatetime = 250 -- nvim tree basics @@ -49,7 +50,6 @@ vim.cmd([[ -- language server setup local lspconfig = require('lspconfig') -vim.o.updatetime = 250 -- local on_attach = function(client, bufnr) -- -- key mappings From 998e2076eaa627dd29d117e47202dc8d53b0f825 Mon Sep 17 00:00:00 2001 From: KeeganForelight Date: Thu, 13 Apr 2023 17:00:26 -0400 Subject: [PATCH 12/14] fixing clipboard --- config/init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/init.lua b/config/init.lua index f3a9a22..746e3a2 100644 --- a/config/init.lua +++ b/config/init.lua @@ -10,6 +10,9 @@ vim.cmd('set guicursor=') vim.cmd('filetype plugin indent on') vim.cmd('set ts=4 sts=4 sw=4 expandtab') +-- clipboard +vim.cmd('set clipboard+=unamedplus') + -- hybrid numbering vim.opt.relativenumber = true vim.opt.number = true From 185e158b7f863140a8176699505c6d4e32db5f50 Mon Sep 17 00:00:00 2001 From: KeeganForelight Date: Thu, 13 Apr 2023 17:01:23 -0400 Subject: [PATCH 13/14] fixing clipboard --- config/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/init.lua b/config/init.lua index 746e3a2..199e1da 100644 --- a/config/init.lua +++ b/config/init.lua @@ -11,7 +11,7 @@ vim.cmd('filetype plugin indent on') vim.cmd('set ts=4 sts=4 sw=4 expandtab') -- clipboard -vim.cmd('set clipboard+=unamedplus') +vim.cmd('set clipboard+=unnamedplus') -- hybrid numbering vim.opt.relativenumber = true From a31384aa44753d17f8294574268e84769c120e04 Mon Sep 17 00:00:00 2001 From: KeeganForelight Date: Thu, 13 Apr 2023 17:57:10 -0400 Subject: [PATCH 14/14] added system clipboard keybind --- config/init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/init.lua b/config/init.lua index 199e1da..c895c61 100644 --- a/config/init.lua +++ b/config/init.lua @@ -12,6 +12,8 @@ vim.cmd('set ts=4 sts=4 sw=4 expandtab') -- clipboard vim.cmd('set clipboard+=unnamedplus') +vim.keymap.set('n', 'Y', '"+y') +vim.keymap.set('n', 'P', '"+p') -- hybrid numbering vim.opt.relativenumber = true @@ -133,6 +135,8 @@ vim.diagnostic.config({ vim.api.nvim_create_autocmd('LspAttach', { callback = function(ev) + -- custom colors + vim.set('hi DiagnosticUnderlineError cterm=undercurl guisp=Red') -- key mappings local opts = { buffer = ev.buf,} -- error viewing