diff --git a/nvim/.config/nvim/colors/minikanso-zen.lua b/nvim/.config/nvim/colors/minikanso-zen.lua index 5ac4bc1..7582d12 100644 --- a/nvim/.config/nvim/colors/minikanso-zen.lua +++ b/nvim/.config/nvim/colors/minikanso-zen.lua @@ -10,8 +10,6 @@ local palette = { bg0 = '#090E13', bg1 = '#14171d', bg2 = '#1C1E25', - bg3 = '#22262D', - bg4 = '#393B44', blue0 = '#223249', blue1 = '#2D4F67', blue2 = '#658594', @@ -20,15 +18,12 @@ local palette = { red1 = '#c4746e', yellow0 = '#DCA561', yellow1 = '#c4b28a', - green0 = '#98BB6C', green1 = '#8a9a7b', aqua0 = '#6A9589', - aqua1 = '#8ea4a2', violet0 = '#8992a7', pink0 = '#a292a3', orange0 = '#b6927b', fg0 = '#C5C9C7', - fg1 = '#f2f1ef', gray0 = '#A4A7A4', gray1 = '#909398', gray2 = '#75797f', @@ -36,21 +31,7 @@ local palette = { gray4 = '#43464E', } ---- ColorColumn, Conceal, Cursor, lCursor, CursorIM, CursorLine, CursorColumn, ---- CursorLineSign, CursorLineFold, CursorLineNr, NormalNC, WildMenu, - --- vim.api.nvim_set_hl(0, 'ColorColumn', { bg = palette.bg2 }) --- vim.api.nvim_set_hl(0, 'Conceal', { fg = palette.gray3, bold = true }) - vim.api.nvim_set_hl(0, 'CurSearch', { fg = palette.fg0, bg = palette.blue1, bold = true }) --- vim.api.nvim_set_hl(0, 'Cursor', { fg = palette.bg0, bg = palette.fg1 }) --- vim.api.nvim_set_hl(0, 'lCursor', { link = 'Cursor' }) --- vim.api.nvim_set_hl(0, 'CursorIM', { link = 'Cursor' }) --- vim.api.nvim_set_hl(0, 'CursorLine', { bg = palette.bg3 }) --- vim.api.nvim_set_hl(0, 'CursorColumn', { link = 'CursorLine' }) --- vim.api.nvim_set_hl(0, 'CursorLineSign', { link = 'CursorLine' }) --- vim.api.nvim_set_hl(0, 'CursorLineFold', { link = 'CursorLine' }) --- vim.api.nvim_set_hl(0, 'CursorLineNr', { fg = palette.fg1, bg = palette.none }) vim.api.nvim_set_hl(0, 'Directory', { fg = palette.blue3 }) vim.api.nvim_set_hl(0, 'EndOfBuffer', { fg = palette.bg0 }) @@ -70,54 +51,44 @@ vim.api.nvim_set_hl(0, 'MoreMsg', { link = 'DiagnosticInfo' }) vim.api.nvim_set_hl(0, 'NonText', { fg = palette.gray3 }) vim.api.nvim_set_hl(0, 'Normal', { fg = palette.fg0, bg = palette.bg0 }) --- vim.api.nvim_set_hl(0, 'NormalNC', { link = 'Normal' }) vim.api.nvim_set_hl(0, 'NormalFloat', { fg = palette.gray0, bg = palette.bg1 }) vim.api.nvim_set_hl(0, 'FloatBorder', { fg = palette.gray4, bg = palette.bg1 }) -vim.api.nvim_set_hl(0, 'FloatTitle', { fg = palette.gray3, bg = palette.bg1, bold = true }) +vim.api.nvim_set_hl(0, 'FloatTitle', { fg = palette.gray0, bg = palette.bg1, bold = true }) vim.api.nvim_set_hl(0, 'FloatFooter', { fg = palette.gray3, bg = palette.bg1 }) vim.api.nvim_set_hl(0, 'Pmenu', { link = 'NormalFloat' }) vim.api.nvim_set_hl(0, 'PmenuSel', { fg = palette.none, bg = palette.gray4 }) --- vim.api.nvim_set_hl(0, 'PmenuKind', { link = 'Pmenu' }) vim.api.nvim_set_hl(0, 'PmenuKindSel', { fg = palette.gray0, bg = palette.gray4 }) vim.api.nvim_set_hl(0, 'PmenuExtra', { fg = palette.gray3, bg = palette.bg1 }) vim.api.nvim_set_hl(0, 'PmenuExtraSel', { fg = palette.gray3, bg = palette.gray4 }) vim.api.nvim_set_hl(0, 'PmenuBorder', { link = 'FloatBorder' }) vim.api.nvim_set_hl(0, 'PmenuSbar', { bg = palette.bg0 }) -vim.api.nvim_set_hl(0, 'PmenuThumb', { bg = palette.bg4 }) +vim.api.nvim_set_hl(0, 'PmenuThumb', { bg = palette.gray4 }) vim.api.nvim_set_hl(0, 'Question', { link = 'MoreMsg' }) vim.api.nvim_set_hl(0, 'QuickFixLine', { bg = palette.bg2 }) vim.api.nvim_set_hl(0, 'Search', { fg = palette.fg0, bg = palette.blue1 }) vim.api.nvim_set_hl(0, 'SpecialKey', { link = 'NonText' }) -vim.api.nvim_set_hl(0, 'StatusLine', { fg = palette.gray0, bg = palette.bg1 }) +vim.api.nvim_set_hl(0, 'StatusLine', { link = 'NormalFloat' }) vim.api.nvim_set_hl(0, 'StatusLineNC', { fg = palette.gray3, bg = palette.bg1 }) vim.api.nvim_set_hl(0, 'Title', { fg = palette.blue3, bold = true }) -vim.api.nvim_set_hl(0, 'Visual', { bg = palette.bg4 }) +vim.api.nvim_set_hl(0, 'Visual', { bg = palette.gray4 }) vim.api.nvim_set_hl(0, 'VisualNOS', { link = 'Visual' }) vim.api.nvim_set_hl(0, 'WarningMsg', { fg = palette.yellow0 }) --- vim.api.nvim_set_hl(0, 'WildMenu', { link = 'Pmenu' }) - --- vim.api.nvim_set_hl(0, 'SpellBad', { link = 'DiagnosticUnderlineError' }) --- vim.api.nvim_set_hl(0, 'SpellCap', { link = 'DiagnosticUnderlineWarn' }) --- vim.api.nvim_set_hl(0, 'SpellRare', { undercurl = true, sp = palette.violet0 }) --- vim.api.nvim_set_hl(0, 'SpellLocal', { undercurl = true, sp = palette.aqua1 }) vim.api.nvim_set_hl(0, 'DiagnosticError', { fg = palette.red0 }) vim.api.nvim_set_hl(0, 'DiagnosticWarn', { fg = palette.yellow0 }) vim.api.nvim_set_hl(0, 'DiagnosticInfo', { fg = palette.blue2 }) vim.api.nvim_set_hl(0, 'DiagnosticHint', { fg = palette.aqua0 }) -vim.api.nvim_set_hl(0, 'DiagnosticOk', { fg = palette.green0 }) +vim.api.nvim_set_hl(0, 'DiagnosticOk', { fg = palette.green1 }) vim.api.nvim_set_hl(0, 'DiagnosticUnderlineError', { undercurl = true, sp = palette.red0 }) vim.api.nvim_set_hl(0, 'DiagnosticUnderlineWarn', { undercurl = true, sp = palette.yellow0 }) vim.api.nvim_set_hl(0, 'DiagnosticUnderlineInfo', { undercurl = true, sp = palette.blue2 }) vim.api.nvim_set_hl(0, 'DiagnosticUnderlineHint', { undercurl = true, sp = palette.aqua0 }) -vim.api.nvim_set_hl(0, 'DiagnosticUnderlineOk', { undercurl = true, sp = palette.green0 }) +vim.api.nvim_set_hl(0, 'DiagnosticUnderlineOk', { undercurl = true, sp = palette.green1 }) vim.api.nvim_set_hl(0, 'LspSignatureActiveParameter', { fg = palette.yellow0 }) ---- ---- VertSplit, Ignore, PmenuKind, SpellBad, SpellCap, SpellRare, SpellLocal. vim.api.nvim_set_hl(0, 'Comment', { fg = palette.gray2, italic = true }) vim.api.nvim_set_hl(0, 'Constant', { fg = palette.orange0 }) @@ -133,17 +104,16 @@ vim.api.nvim_set_hl(0, 'Operator', { fg = palette.gray1 }) vim.api.nvim_set_hl(0, 'Keyword', { fg = palette.violet0, italic = true }) vim.api.nvim_set_hl(0, 'Exception', { link = 'Statement' }) vim.api.nvim_set_hl(0, 'PreProc', { fg = palette.gray1 }) -vim.api.nvim_set_hl(0, 'Type', { fg = palette.aqua1 }) +vim.api.nvim_set_hl(0, 'Type', { fg = palette.blue3 }) vim.api.nvim_set_hl(0, 'Special', { fg = palette.yellow1 }) vim.api.nvim_set_hl(0, 'Delimiter', { fg = palette.gray1 }) vim.api.nvim_set_hl(0, 'Underlined', { fg = palette.yellow1, underline = true }) vim.api.nvim_set_hl(0, 'Bold', { bold = true }) vim.api.nvim_set_hl(0, 'Italic', { italic = true }) --- vim.api.nvim_set_hl(0, 'Ignore', { link = 'NonText' }) vim.api.nvim_set_hl(0, 'Todo', { fg = palette.blue0, bg = palette.blue2, bold = true }) vim.api.nvim_set_hl(0, 'qfLineNr', { link = 'LineNr' }) vim.api.nvim_set_hl(0, 'qfFileName', { link = 'Directory' }) -vim.api.nvim_set_hl(0, 'Added', { fg = palette.green0 }) +vim.api.nvim_set_hl(0, 'Added', { fg = palette.green1 }) vim.api.nvim_set_hl(0, 'Removed', { fg = palette.red0 }) vim.api.nvim_set_hl(0, '@variable', { fg = palette.fg0 }) diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 793d98d..c09ee64 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -22,16 +22,6 @@ vim.opt.shiftwidth = 2 vim.opt.softtabstop = -1 vim.opt.expandtab = true --- vim.opt.autocomplete = true --- vim.opt.autocompletedelay = 40 --- vim.opt.complete = 'o' --- vim.opt.complete = 'o,.^5,b^3' --- vim.opt.complete = 'o,.,b^3' --- vim.opt.completeopt:append({ 'fuzzy', 'menuone', 'noinsert' }) - --- vim.opt.pummaxwidth = 100 --- vim.opt.pumheight = 12 - vim.diagnostic.config({ virtual_text = true, severity_sort = true, diff --git a/nvim/.config/nvim/lua/DarthMooMancer/keymaps.lua b/nvim/.config/nvim/lua/DarthMooMancer/keymaps.lua index 2278161..8aaf4a8 100644 --- a/nvim/.config/nvim/lua/DarthMooMancer/keymaps.lua +++ b/nvim/.config/nvim/lua/DarthMooMancer/keymaps.lua @@ -29,51 +29,34 @@ map('n', 'uu', function() }) end, { desc = 'native undotree', silent = true }) ----- Used if mini.pairs is not active --- vim.keymap.set('i', '', function() --- if vim.fn.pumvisible() == 1 then --- return '' --- else --- return '' --- end --- end, { expr = true, silent = true }) - --- Used if mini.pairs is active -vim.keymap.set('i', '', function() - if vim.fn.pumvisible() == 1 then - return vim.keycode('') .. require('mini.pairs').cr() - end - return require('mini.pairs').cr() -end, { expr = true, replace_keycodes = true, desc = 'Newline, never accept completion' }) - local qf_group = vim.api.nvim_create_augroup('DiagnosticsQuickfix', { clear = true }) -local function set_diagnostics_qf() - local items = vim.diagnostic.toqflist(vim.diagnostic.get()) - vim.fn.setqflist(items, 'r') - return #items +local function qf_open() + return vim.fn.getqflist({ winid = 0 }).winid ~= 0 end map('n', 'xx', function() - if vim.fn.getqflist({ winid = 0 }).winid ~= 0 then + if qf_open() then vim.cmd('cclose') return end - if set_diagnostics_qf() == 0 then + if #vim.diagnostic.get() == 0 then vim.notify('No diagnostics found', vim.log.levels.WARN) return end - vim.cmd('copen') + vim.diagnostic.setqflist({ open = true, title = 'Diagnostics' }) end, { desc = 'Toggle diagnostics quickfix' }) vim.api.nvim_create_autocmd('DiagnosticChanged', { group = qf_group, callback = function() - if vim.fn.getqflist({ winid = 0 }).winid == 0 then + if not qf_open() then return end - if set_diagnostics_qf() == 0 then + if #vim.diagnostic.get() == 0 then vim.cmd('cclose') + else + vim.diagnostic.setqflist({ open = false, title = 'Diagnostics' }) end end, }) diff --git a/nvim/.config/nvim/lua/DarthMooMancer/lsp.lua b/nvim/.config/nvim/lua/DarthMooMancer/lsp.lua index ba1fd7d..ee91746 100644 --- a/nvim/.config/nvim/lua/DarthMooMancer/lsp.lua +++ b/nvim/.config/nvim/lua/DarthMooMancer/lsp.lua @@ -1,11 +1,10 @@ --- local capabilities = vim.lsp.protocol.make_client_capabilities() local capabilities = require('blink.cmp').get_lsp_capabilities(nil, true) +-- if capabilities.workspace then +-- capabilities.workspace.didChangeWatchedFiles = nil +-- end vim.lsp.config('*', { capabilities = capabilities, }) -if capabilities.workspace then - capabilities.workspace.didChangeWatchedFiles = nil -end vim.lsp.config('gopls', { cmd = { 'gopls' }, @@ -41,8 +40,7 @@ vim.lsp.config('lua_ls', { checkThirdParty = false, library = { vim.env.VIMRUNTIME .. '/lua', - - '/Users/andrew/personal/Projects/Lua/vern-nvim/lua', + -- '/Users/andrew/personal/Projects/Lua/vern-nvim/lua', }, }, }, @@ -110,34 +108,6 @@ vim.lsp.config('vtsls', { end, }) --- function _G.DarthMooMancer_omnifunc(findstart, base) --- if findstart == 1 then --- local col = vim.fn.col('.') --- local line = vim.fn.getline('.') --- local before = col > 1 and line:sub(col - 1, col - 1) or '' --- if before == '' or before:match('%s') then --- return -3 -- cancel silently, leave completion mode --- end --- end --- return vim.lsp.omnifunc(findstart, base) --- end --- --- vim.api.nvim_create_autocmd('LspAttach', { --- callback = function(ev) --- if vim.bo[ev.buf].omnifunc == 'v:lua.vim.lsp.omnifunc' then --- vim.bo[ev.buf].omnifunc = 'v:lua.DarthMooMancer_omnifunc' --- end --- end, --- }) --- vim.api.nvim_create_autocmd('LspAttach', { --- callback = function(ev) --- local client = vim.lsp.get_client_by_id(ev.data.client_id) --- if client and client:supports_method('textDocument/completion') then --- vim.lsp.completion.enable(true, client.id, ev.buf) --- end --- end, --- }) - vim.lsp.enable({ 'lua_ls', 'clangd', diff --git a/nvim/.config/nvim/lua/DarthMooMancer/plugins.lua b/nvim/.config/nvim/lua/DarthMooMancer/plugins.lua index ae6f55c..1f7b530 100644 --- a/nvim/.config/nvim/lua/DarthMooMancer/plugins.lua +++ b/nvim/.config/nvim/lua/DarthMooMancer/plugins.lua @@ -4,6 +4,7 @@ vim.pack.add({ { src = 'https://github.com/stevearc/conform.nvim' }, { src = 'https://github.com/alexghergh/nvim-tmux-navigation' }, { src = 'https://github.com/saghen/blink.cmp', version = vim.version.range('*') }, + { src = 'https://git.moomancer.xyz/DarthMooMancer/vern-nvim.git' }, }) local parsers = { @@ -116,7 +117,7 @@ end) vim.o.formatexpr = "v:lua.require'conform'.formatexpr()" -vim.opt.rtp:append('/Users/andrew/personal/Projects/Lua/vern-nvim') +-- vim.opt.rtp:append('/Users/andrew/personal/Projects/Lua/vern-nvim') require('vern-nvim').setup({ env = { author = 'DarthMooMancer', diff --git a/nvim/.config/nvim/nvim-pack-lock.json b/nvim/.config/nvim/nvim-pack-lock.json index a94e30c..439eaba 100644 --- a/nvim/.config/nvim/nvim-pack-lock.json +++ b/nvim/.config/nvim/nvim-pack-lock.json @@ -19,8 +19,12 @@ "src": "https://github.com/alexghergh/nvim-tmux-navigation" }, "nvim-treesitter": { - "rev": "0195cd62fa89950f34c0e0d648ea7897ab85d4d3", + "rev": "b706d642dd20d0922e7e92365dc73617f0fdb4ea", "src": "https://github.com/nvim-treesitter/nvim-treesitter" + }, + "vern-nvim": { + "rev": "421cf95bc603d8c2afa76766fb0656ebfe8b918f", + "src": "https://git.moomancer.xyz/DarthMooMancer/vern-nvim.git" } } }