diff --git a/after/plugin/theme.lua b/after/plugin/theme.lua index 643b02c..ba8256b 100644 --- a/after/plugin/theme.lua +++ b/after/plugin/theme.lua @@ -8,9 +8,9 @@ local ts_context_hl = c.change_hex_lightness(ts_context_hl, -55) local highlights = { - TreesitterContext = { - bg = ts_context_hl, - }, + -- TreesitterContext = { + -- bg = ts_context_hl, + -- }, InlayHint = { fg = "#a9a19a", }, diff --git a/lua/custom/chadrc.lua b/lua/custom/chadrc.lua index fd832af..5f7ed58 100644 --- a/lua/custom/chadrc.lua +++ b/lua/custom/chadrc.lua @@ -18,8 +18,8 @@ local highlights = require "custom.highlights" M.ui = { -- theme = "gruvbox_material", -- theme = "ayu-dark", - theme = "chadracula", - theme_toggle = { "catppuccin", "chadracula"}, + theme = "blob42", + theme_toggle = { "blob42", "chadracula"}, -- transparency = true, hl_override = highlights.override, hl_add = highlights.add, @@ -31,7 +31,7 @@ M.ui = { myicons = { lsp = { diagnostic_head = '', -- default diagnostic head on dialogs - diagnostic_err = '', -- severity 1 + diagnostic_err = '', -- severity 1 diagnostic_warn = '', -- 2 diagnostic_info = '', -- 3 diagnostic_hint = '', -- 4 @@ -54,8 +54,6 @@ M.plugins = { tabufline = { enabled = false, } - - }, ["windwp/nvim-autopairs"] = { disable_filetype = { diff --git a/lua/custom/highlights.lua b/lua/custom/highlights.lua index d27eeb1..36446b0 100644 --- a/lua/custom/highlights.lua +++ b/lua/custom/highlights.lua @@ -38,7 +38,7 @@ M.override = { fg = "white" }, St_LspStatus = { - fg = "sun" + fg = "blue" }, -- LineNr = { -- fg = "#5f4468" -- outrun @@ -47,7 +47,7 @@ M.override = { M.add = { Visual = { - bg = "#ff7775", + bg = "cyan", fg = "black", }, BookmarkSign = { @@ -128,6 +128,9 @@ M.add = { fg = "white", bold = true }, + TreesitterContext = { + bg = "one_bg3" + } } diff --git a/lua/custom/plugins/configs/navigator.lua b/lua/custom/plugins/configs/navigator.lua index 14cb82d..5a09053 100644 --- a/lua/custom/plugins/configs/navigator.lua +++ b/lua/custom/plugins/configs/navigator.lua @@ -5,6 +5,8 @@ if not present then return end +local myicons = require("custom.chadrc").ui.myicons + M = {} local get_current_gomod = function() @@ -21,6 +23,7 @@ end -- default config -- "~/.local/share/nvim/site/pack/packer/opt/navigator.lua/lua/navigator.lua" +-- "~/.local/share/nvim/site/pack/packer/opt/navigator.lua/lua/navigator/lspclient/mapping.lua" local config = { debug = false, transparency = 5, @@ -29,38 +32,12 @@ local config = { on_attach = require('plugins.configs.lspconfig').on_attach, keymaps = { { key = 'gr', func = require('navigator.reference').async_ref, desc = 'lsp async_ref' }, - -- { key = 'gr', func = require('navigator.reference').reference, desc = 'lsp reference' }, -- reference deprecated - -- { key = '', func = vim.lsp.buf.signature_help, desc = 'lsp signature_help' }, { key = 'g0', func = require('navigator.symbols').document_symbols, desc = 'lsp document_symbols' }, { key = 'gW', func = require('navigator.workspace').workspace_symbol_live, desc = 'lsp workspace_symbol_live' }, { key = '', func = require('navigator.definition').definition, desc = 'lsp definition' }, { key = 'gd', func = require('navigator.definition').definition, desc = 'lsp definition' }, { key = 'gp', func = require('navigator.definition').definition_preview, desc = 'lsp definition preview' }, { key = 'gP', func = require('navigator.definition').type_definition_preview, desc = 'lsp type definition preview' }, - -- handled by main mappings - -- { key = 'gt', func = require('navigator.treesitter').buf_ts, desc = 'lsp buf_ts' }, - -- { key = 'gT', func = require('navigator.treesitter').bufs_ts, desc = 'lsp bufs_ts' }, - -- { key = 'ct', func = require('navigator.ctags').ctags, desc = 'lsp ctags' }, - - -- handled by main mappings (lspconfig section) - -- { key = 'gD', func = vim.lsp.buf.declaration, desc = 'lsp declaration' }, - -- { - -- key = '', - -- mode = 'i', - -- func = vim.lsp.buf.signature_help, - -- desc = 'lsp signature_help' - -- }, - -- { key = 'K', func = vim.lsp.buf.hover, desc = 'lsp hover' }, - -- { key = 'gm', func = vim.lsp.buf.implementation, desc = 'lsp implementation' }, - -- { key = 'D', func = vim.lsp.buf.type_definition, desc = 'lsp type_definition' }, - -- { key = ']d', func = vim.diagnostic.goto_next, desc = 'lsp next diagnostics' }, - -- { key = '[d', func = vim.diagnostic.goto_prev, desc = 'lsp prev diagnostics' }, - -- { key = ']O', func = vim.diagnostic.setloclist, desc = 'lsp diagnostics set loclist' }, - -- { key = 'fm', func = vim.lsp.buf.format, mode = 'n', desc = 'lsp format' }, - -- { key = 'gi', func = vim.lsp.buf.incoming_calls, desc = 'lsp incoming_calls' }, - -- { key = 'go', func = vim.lsp.buf.outgoing_calls, desc = 'lsp outgoing_calls' }, - -- { key = '', func = vim.lsp.buf.definition, desc = 'lsp definition' }, - -- { key = 'g', func = vim.lsp.buf.implementation, desc = 'lsp implementation' }, { key = '', mode = 'n', func = require('navigator.codeAction').code_action, desc = 'lsp code_action' }, { key = '', mode = 'i', func = require('navigator.codeAction').code_action, desc = 'lsp code_action' }, @@ -71,12 +48,9 @@ local config = { func = require('navigator.codeAction').range_code_action, desc = 'lsp range_code_action', }, - -- { key = 're', func = 'rename()' }, { key = 'rn', func = require('navigator.rename').rename, desc = 'lsp rename' }, { key = 'gL', func = require('navigator.diagnostics').show_diagnostics, desc = 'lsp show_diagnostics' }, { key = 'gG', func = require('navigator.diagnostics').show_buf_diagnostics, desc = 'lsp show_buf_diagnostics' }, - -- { key = 'dt', func = require('navigator.diagnostics').toggle_diagnostics, desc = 'lsp toggle_diagnostics' }, - -- { key = 'td', func = require('spike.diagnostics').toggle, desc = 'lsp toggle_diagnostics' }, { key = ']r', func = require('navigator.treesitter').goto_next_usage, desc = 'lsp goto_next_usage' }, { key = '[r', func = require('navigator.treesitter').goto_previous_usage, desc = 'lsp goto_previous_usage' }, { key = 'k', func = require('navigator.dochighlight').hi_symbol, desc = 'lsp hi_symbol' }, @@ -86,14 +60,6 @@ local config = { func = require('navigator.workspace').remove_workspace_folder, desc = 'lsp lsp remove_workspace_folder', }, - -- { key = 'ff', func = vim.lsp.buf.range_formatting, mode = 'v', desc = 'lsp range format' }, - -- DEPRECATED - -- { - -- key = 'gm', - -- func = require('navigator.formatting').range_format, - -- mode = 'n', - -- desc = 'lsp range format operator e.g gmip', - -- }, { key = 'wl', func = require('navigator.workspace').list_workspace_folders, desc = 'lsp list_workspace_folders' }, { key = 'll', mode = 'n', func = require('navigator.codelens').run_action, desc = 'lsp run code lens action' }, }, @@ -107,11 +73,11 @@ local config = { code_lens_action_icon = '', -- Diagnostics - diagnostic_head = '', -- default diagnostic head on dialogs - diagnostic_err = '', -- severity 1 - diagnostic_warn = '', -- 2 - diagnostic_info = '', -- 3 - diagnostic_hint = '', -- 4 + diagnostic_head = myicons.lsp.diagnostic_head, -- default diagnostic head on dialogs + diagnostic_err = myicons.lsp.diagnostic_err, -- severity 1 + diagnostic_warn = myicons.lsp.diagnostic_warn, -- 2 + diagnostic_info = myicons.lsp.diagnostic_info, -- 3 + diagnostic_hint = myicons.lsp.diagnostic_hint, -- 4 -- used in the diagnostics summary window diagnostic_head_severity_1 = '', @@ -240,6 +206,12 @@ local config = { mccabe = { enabled = false }, pycodestyle= { enabled = false}, pyflakes = { enabled = false }, + + -- install python-lsp-ruff + -- if using mason activate venv from mason package + -- and install inside venv + -- select isort and pycodestyle + ruff = { enabled = true, select = {"I", "E"}} } } } diff --git a/lua/custom/plugins/configs/neodev.lua b/lua/custom/plugins/configs/neodev.lua index af696a4..5e9315a 100644 --- a/lua/custom/plugins/configs/neodev.lua +++ b/lua/custom/plugins/configs/neodev.lua @@ -15,7 +15,7 @@ local config = { runtime = true, -- runtime path types = true, -- full signature, docs and completion of vim.api, vim.treesitter, vim.lsp and others -- plugins = true, -- installed opt or start plugins in packpath - plugins = {"plenary.nvim", "grapple.nvim", "nvim-dap"}, + plugins = {"plenary.nvim", "grapple.nvim", "nvim-dap", "nvchad_ui", "base46"}, -- -- plugins = {"navigator.lua", "guihua.lua", "go.nvim", "plenary.nvim"}, -- you can also specify the list of plugins to make available as a workspace library -- plugins = { "nvim-treesitter", "plenary.nvim", "telescope.nvim" }, diff --git a/lua/custom/plugins/configs/noirbuddy.lua b/lua/custom/plugins/configs/noirbuddy.lua new file mode 100644 index 0000000..e7e0073 --- /dev/null +++ b/lua/custom/plugins/configs/noirbuddy.lua @@ -0,0 +1,22 @@ +local ok, noirbuddy = pcall(require, "noirbuddy") +if not ok then + vim.notify("missing module noirbuddy", vim.log.levels.WARN) + return +end + +local M = {} + +M.config = { + preset = 'minimal', + colors = { + primary = '#BD93F9', + secondary = '#92a2d4', + }, +} + +M.setup = function() + -- noirbuddy.setup(M.config) +end + + +return M diff --git a/lua/custom/plugins/configs/null-ls.lua b/lua/custom/plugins/configs/null-ls.lua index 73b117d..0ab6ea4 100644 --- a/lua/custom/plugins/configs/null-ls.lua +++ b/lua/custom/plugins/configs/null-ls.lua @@ -15,8 +15,8 @@ M.default_sources = { null_ls.builtins.diagnostics.fish, null_ls.builtins.formatting.fish_indent, null_ls.builtins.diagnostics.hadolint, - null_ls.builtins.formatting.ruff, - null_ls.builtins.diagnostics.ruff, + -- null_ls.builtins.formatting.ruff, + -- null_ls.builtins.diagnostics.ruff, } M.extra_sources = { diff --git a/lua/custom/plugins/configs/treesitter.lua b/lua/custom/plugins/configs/treesitter.lua index 1a5fb9f..25ee4a2 100644 --- a/lua/custom/plugins/configs/treesitter.lua +++ b/lua/custom/plugins/configs/treesitter.lua @@ -23,7 +23,7 @@ return { }, highlight = { - enable = true, + enable = false, disable = function(lang, bufnr) return lang == "help" end diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 6670bb2..9a2b894 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -1,6 +1,6 @@ -- vim: foldlevel=1 foldmethod=marker -- --- TODO: interesting plugins to install +-- TODO: plugins to test -- - neovim minisurround to replace vim-surround -- -- #### notes on Lua and requiring modules @@ -419,6 +419,16 @@ return { }, -- }}} -- Theme customization + + + ["jesseleite/nvim-noirbuddy"] = { + opt = true, + requires = {"tjdevries/colorbuddy.nvim", branch = "dev"}, + config = function() + require("custom.plugins.configs.noirbuddy").setup() + end, + }, + -- Color picker ["uga-rosa/ccc.nvim"] = { -- {{{{{{ -- commit = "427471b", @@ -569,7 +579,7 @@ return { -- ["~/src/delaytrain.nvim"] = { config = function() require('delaytrain').setup({ - delay_ms = 1000, -- How long repeated usage of a key should be prevented + delay_ms = 1001, -- How long repeated usage of a key should be prevented grace_period = 1, -- How many repeated keypresses are allowed keys = { -- Which keys (in which modes) should be delayed ['n'] = { 'h', 'j', 'k', 'l' }, diff --git a/lua/custom/themes/blob42.lua b/lua/custom/themes/blob42.lua new file mode 100644 index 0000000..fa442a5 --- /dev/null +++ b/lua/custom/themes/blob42.lua @@ -0,0 +1,64 @@ +local M = {} + +M.base_30 = { + white = "#F8F8F2", + darker_black = "#222430", + black = "#282A36", -- nvim bg + black2 = "#2d303e", + one_bg = "#373844", -- real bg of onedark + one_bg2 = "#44475a", + one_bg3 = "#565761", + grey = "#5e5f69", + grey_fg = "#666771", + grey_fg2 = "#6e6f79", + light_grey = "#73747e", + red = "#e87c7c", + baby_pink = "#ef9d9d", + pink = "#ec8cc3", + line = "#3c3d49", -- for lines like vertsplit + green = "#7ddc95", + vibrant_green = "#5dff88", + nord_blue = "#8b9bcd", + blue = "#a1b1e3", + yellow = "#8d90e2", + sun = "#dea946", + purple = "#BD93F9", + dark_purple = "#BD93F9", + teal = "#92a2d4", + orange = "#FFB86C", + cyan = "#74a9e1", + statusline_bg = "#2d2f3b", + lightbg = "#41434f", + pmenu_bg = "#92a2d4", + folder_bg = "#BD93F9", +} + +M.base_16 = { + base00 = "#282936", + base01 = "#3a3c4e", + base02 = "#4d4f68", + base03 = "#626483", + base04 = "#94b2b6", + base05 = "#e9e9f4", + base06 = "#f1f2f8", + base07 = "#f7f7fb", + base08 = "#c2abd5", -- #TODO!: secondary + base09 = "#e9b782", + base0A = "#7dc2cd", + base0B = "#e8cfcf", + base0C = "#8BE9FD", + base0D = "#ef9d9d", -- #NOTE: primmary + base0E = "#c5c0c3", + base0F = "#f7f7f3", +} + +-- M.polish_hl = { +-- ["@function.builtin"] = { fg = M.base_30.cyan }, +-- ["@number"] = { fg = M.base_30.purple }, +-- } + +vim.opt.bg = "dark" + +M = require("base46").override_theme(M, "blob42") + +return M diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua index cfd8aa0..278a55c 100644 --- a/lua/plugins/configs/telescope.lua +++ b/lua/plugins/configs/telescope.lua @@ -47,7 +47,7 @@ local options = { winblend = 0, border = {}, borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" }, - color_devicons = true, + color_devicons = false, set_env = { ["COLORTERM"] = "truecolor" }, -- default = nil, file_previewer = require("telescope.previewers").vim_buffer_cat.new, grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new, diff --git a/lua/spike/utils/init.lua b/lua/spike/utils/init.lua index bed9c7e..e6674b8 100644 --- a/lua/spike/utils/init.lua +++ b/lua/spike/utils/init.lua @@ -31,7 +31,7 @@ M.reload_theme = function() end M.set_plugin_mappings = function(plugin_name, mapping_opt) - mappings = require("core.utils").load_config().mappings[plugin_name] + local mappings = require("core.utils").load_config().mappings[plugin_name] mappings.plugin = nil for mode, mode_values in pairs(mappings) do @@ -52,7 +52,7 @@ end -- @param timestamp in milliseconds -- @return human readable string M.human_timestamp = function() - cword = vim.fn.expand('') + local cword = vim.fn.expand('') -- make sure cword is a number @@ -60,7 +60,7 @@ M.human_timestamp = function() if n == nil then return end local time = os.date("*t", cword / (1000*1000)) - format = string.format("%04d-%02d-%02d %02d:%02d:%02d", time.year, time.month, time.day, time.hour, time.min, time.sec) + local format = string.format("%04d-%02d-%02d %02d:%02d:%02d", time.year, time.month, time.day, time.hour, time.min, time.sec) vim.notify(format, vim.lsp.log_levels.INFO) end