diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 05df20b..356e780 100755 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -18,6 +18,7 @@ vim.g.mapleader = ',' vim.g.localmapleader = ',' --- vim.opt.textwidth = 85 vim.opt.colorcolumn = '+2' +-- vim.diagnostic.config({ virtual_text = true, virtual_lines = true }) require('lazy').setup('plugins') -- require('code-shot').setup() @@ -48,7 +49,7 @@ opt.shadafile = "NONE" opt.shadafile = "" opt.shell = "/bin/zsh" opt.updatetime = 200 -opt.cursorline = true +-- opt.cursorline = true g.markdown_folding = 1 -- g.markdown_enable_folding = 1 opt.spell=true @@ -90,15 +91,6 @@ g.expandtab = false -- Use spaces instead of tabs g.shiftwidth = 2 -- Shift 4 spaces when tab g.tabstop = 2 -- 1 tab == 4 spaces g.smartindent = true -- Autoindent new lines ------------------------------------------------------------ --- Glow Settings ------------------------------------------------------------ -g.glow_binary_path = '/bin' -g.glow_border = 'rounded' -g.glow_width = 120 -g.glow_use_pager = true -g.glow_style = 'dark' - ----------------------------------------------------------- -- AutoCmd and Additional Function Settings. ----------------------------------------------------------- @@ -137,15 +129,6 @@ for _, plugin in pairs(disabled_built_ins) do vim.g["loaded_" .. plugin] = 1 end --- Deletes all trailing whitespaces in a file if it's not binary nor a diff. -function _G.trim_trailing_whitespaces() - if not o.binary and o.filetype ~= 'diff' then - local current_view = fn.winsaveview() - cmd([[keeppatterns %s/\s\+$//e]]) - fn.winrestview(current_view) - end -end - -- Correctly set $VIRTUAL_ENV for Python venvs. if vim.fn.exists("$VIRTUAL_ENV") == 1 then vim.g.python3_host_prog = vim.fn.substitute(vim.fn.system("pyenv which python3 | head -n2 | tail -n1"), "\n", "", "g") @@ -153,26 +136,5 @@ else vim.g.python3_host_prog = vim.fn.substitute(vim.fn.system("which python3"), "\n", "", "g") end --- see https://github.com/hrsh7th/nvim-cmp/wiki/Menu-Appearance#how-to-add-visual-studio-code-dark-theme-colors-to-the-menu ---[[vim.cmd[[ - highlight! link CmpItemMenu Comment - " gray - highlight! CmpItemAbbrDeprecated guibg=NONE gui=strikethrough guifg=#808080 - " blue - highlight! CmpItemAbbrMatch guibg=NONE guifg=#569CD6 - highlight! CmpItemAbbrMatchFuzzy guibg=NONE guifg=#569CD6 - " light blue - highlight! CmpItemKindVariable guibg=NONE guifg=#9CDCFE - highlight! CmpItemKindInterface guibg=NONE guifg=#9CDCFE - highlight! CmpItemKindText guibg=NONE guifg=#9CDCFE - " pink - highlight! CmpItemKindFunction guibg=NONE guifg=#C586C0 - highlight! CmpItemKindMethod guibg=NONE guifg=#C586C0 - " front - highlight! CmpItemKindKeyword guibg=NONE guifg=#D4D4D4 - highlight! CmpItemKindProperty guibg=NONE guifg=#D4D4D4 - highlight! CmpItemKindUnit guibg=NONE guifg=#D4D4D4 - ]] - --]] - +vim.lsp.enable({'ruff', 'marksman'}) require('core/keymaps') diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index 73798c0..8532af8 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -1,84 +1,69 @@ { "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, - "adjacent.nvim": { "branch": "main", "commit": "a555ab92d61aa6fbbfa1bfaef4633b663563f04e" }, "async.vim": { "branch": "master", "commit": "2082d13bb195f3203d41a308b89417426a7deca1" }, - "avante.nvim": { "branch": "main", "commit": "ebadba7420a5f9b85829273b8c9cd2be56d9b074" }, - "barbar.nvim": { "branch": "master", "commit": "53b5a2f34b68875898f0531032fbf090e3952ad7" }, + "barbar.nvim": { "branch": "master", "commit": "807bede7ef1d8e2ac5f108e9ac8123b1e2d321e3" }, "blink-emoji.nvim": { "branch": "master", "commit": "a77aebc092ebece1eed108f301452ae774d6b67a" }, - "blink.cmp": { "branch": "main", "commit": "dcda20d3aa345025699a920c45b0a0603551f41d" }, - "copilot.lua": { "branch": "master", "commit": "30321e33b03cb924fdcd6a806a0dc6fa0b0eafb9" }, + "blink.cmp": { "branch": "main", "commit": "49f211fe5d729df53df4c042d7c3464cf47d199e" }, "dashboard-nvim": { "branch": "master", "commit": "000448d837f6e7a47f8f342f29526c4d7e49e9ce" }, "deadcolumn.nvim": { "branch": "master", "commit": "8f5f8610fda22ff7a3937bc72d0e7d41faaceeaa" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, "dracula.nvim": { "branch": "main", "commit": "96c9d19ce81b26053055ad6f688277d655b3f7d2" }, - "dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" }, "eldritch.nvim": { "branch": "master", "commit": "adedead3423c58cc2e2ebf30001fe4055ad0e416" }, - "f-string-toggle.nvim": { "branch": "main", "commit": "706c85ae72e29b5c148f528fae874852eae515a5" }, + "f-string-toggle.nvim": { "branch": "main", "commit": "74545e699ed0caca603b2612bfa706ff40736d31" }, "fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" }, "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, - "gitsigns.nvim": { "branch": "main", "commit": "4c40357994f386e72be92a46f41fc1664c84c87d" }, + "gitsigns.nvim": { "branch": "main", "commit": "3c76f7fabac723aa682365ef782f88a83ccdb4ac" }, "headlines.nvim": { "branch": "master", "commit": "bf17c96a836ea27c0a7a2650ba385a7783ed322e" }, "hover.nvim": { "branch": "main", "commit": "140c4d0ae9397b76baa46b87c574f5377de09309" }, - "img-clip.nvim": { "branch": "main", "commit": "11f068e3deea5643330146bdda2e852779dcd19c" }, - "indent-blankline.nvim": { "branch": "master", "commit": "e10626f7fcd51ccd56d7ffc00883ba7e0aa28f78" }, - "kanagawa.nvim": { "branch": "master", "commit": "cfd67b0e1eeaa04302b8c7eb072253d24bf22d84" }, + "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, + "kanagawa.nvim": { "branch": "master", "commit": "709018d5af92d2e5780bfb8a6d36e9cad01a6402" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, - "lsp-timeout.nvim": { "branch": "main", "commit": "6325906730330105a9adc41d0ceb8499b3072e2b" }, - "lualine.nvim": { "branch": "master", "commit": "f4f791f67e70d378a754d02da068231d2352e5bc" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, - "mason-null-ls.nvim": { "branch": "main", "commit": "de19726de7260c68d94691afb057fa73d3cc53e7" }, - "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, + "lualine.nvim": { "branch": "master", "commit": "1517caa8fff05e4b4999857319d3b0609a7f57fa" }, "mini.comment": { "branch": "main", "commit": "6e1f9a8ebbf6f693fa3787ceda8ca3bf3cb6aec7" }, "mini.fuzzy": { "branch": "stable", "commit": "faa5a6c0d29c28012c90bd011162963a58715428" }, "mini.hipatterns": { "branch": "main", "commit": "fbf1e2195fdd65cf1bc970316c28098257728868" }, - "mini.icons": { "branch": "main", "commit": "ec61af6e606fc89ee3b1d8f2f20166a3ca917a36" }, + "mini.icons": { "branch": "main", "commit": "86a633f0dffcfd80110bac86681dbf4b5c37ba5c" }, "mini.move": { "branch": "main", "commit": "c8b30e92dd2668dd6e56a9a23cb7d4ee38c2266d" }, "mini.pairs": { "branch": "stable", "commit": "7e834c5937d95364cc1740e20d673afe2d034cdb" }, "mini.surround": { "branch": "main", "commit": "aa5e245829dd12d8ff0c96ef11da28681d6049aa" }, "mini.trailspace": { "branch": "main", "commit": "9bbbf568c06fe424dc21d2c228fa76098008a5f3" }, "mkdnflow.nvim": { "branch": "main", "commit": "d459bd7ce68910272038ed037c028180161fd14d" }, - "morta": { "branch": "main", "commit": "462308c707c0bf0dc1a5e1150ac3aabb544a3820" }, + "morta": { "branch": "main", "commit": "23c407725a38b69d3423cf1d75cf6eb6810e1334" }, "neowarrior.nvim": { "branch": "main", "commit": "197cd4a7a56d07374fcda09b5b56baa433e40549" }, - "nightfly": { "branch": "master", "commit": "c27e76b1adc562b60415ec3688f610206020d64e" }, + "nightfly": { "branch": "master", "commit": "467980e03f0e72250ad9ac0160a21a1f0310cfff" }, "nightfox.nvim": { "branch": "main", "commit": "ba47d4b4c5ec308718641ba7402c143836f35aa9" }, "noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" }, - "nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" }, - "null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" }, + "nui.nvim": { "branch": "main", "commit": "8d3bce9764e627b62b07424e0df77f680d47ffdb" }, "numb.nvim": { "branch": "master", "commit": "7f564e638d3ba367abf1ec91181965b9882dd509" }, - "nvim": { "branch": "main", "commit": "7ab1a6ec70a664ecb95d84669efc20aaf4f4ed1b" }, - "nvim-cmp": { "branch": "main", "commit": "5a11682453ac6b13dbf32cd403da4ee9c07ef1c3" }, - "nvim-http": { "branch": "main", "commit": "9a0e97b639d34af17d06b3421fe633b416dd64ee" }, - "nvim-lspconfig": { "branch": "master", "commit": "9dc8ecb488413d879d5d259b1ec66cf0fa7ffbe9" }, + "nvim": { "branch": "main", "commit": "5b5e3aef9ad7af84f463d17b5479f06b87d5c429" }, + "nvim-lspconfig": { "branch": "master", "commit": "ff6471d4f837354d8257dfa326b031dd8858b16e" }, "nvim-notify": { "branch": "master", "commit": "22f29093eae7785773ee9d543f8750348b1a195c" }, "nvim-tree.lua": { "branch": "master", "commit": "6709463b2d18e77f7a946027917aa00d4aaed6f4" }, - "nvim-treesitter": { "branch": "master", "commit": "8bc635a25f581d42b0a0e5ba8870bd73244dcdea" }, - "nvim-ufo": { "branch": "main", "commit": "a52c92c3bbaa10f0c9b547a50adaa8c7d8b29f94" }, - "nvim-web-devicons": { "branch": "master", "commit": "1020869742ecb191f260818234517f4a1515cfe8" }, - "oil.nvim": { "branch": "master", "commit": "975a77cce3c8cb742bc1b3629f4328f5ca977dad" }, + "nvim-treesitter": { "branch": "master", "commit": "9df671fda41bc4af91b9f7ea3fa1628ba988a77b" }, + "nvim-web-devicons": { "branch": "master", "commit": "4c3a5848ee0b09ecdea73adcd2a689190aeb728c" }, "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, - "popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" }, "pulse.nvim": { "branch": "main", "commit": "4026460b12da9abcfe34322db0bdc80e4b0dce3d" }, - "rainbow-delimiters.nvim": { "branch": "master", "commit": "011d98eaa3a73b5a51d82ce5bc6b1397dde95562" }, - "rainbow_csv.nvim": { "branch": "main", "commit": "7f3fddfe813641035fac2cdf94c2ff69bb0bf0b9" }, - "render-markdown.nvim": { "branch": "main", "commit": "1cd546e96cb8520a148610ca86596ed238eeb936" }, - "semshi": { "branch": "master", "commit": "0182447e2ff4dfa04cd2dfe5f189e012c581ca45" }, + "rainbow-delimiters.nvim": { "branch": "master", "commit": "de39919a57e1a40a4c7dc5bae0de276f9c616ef3" }, + "rainbow_csv.nvim": { "branch": "main", "commit": "26de78d8324f7ac6a3e478319d1eb1f17123eb5b" }, "solarized-osaka.nvim": { "branch": "main", "commit": "e96ec4bb1a622d969d77bb0b4ffd525ccc44b73a" }, + "symbols-outline.nvim": { "branch": "master", "commit": "564ee65dfc9024bdde73a6621820866987cbb256" }, "telescope-cmdline.nvim": { "branch": "main", "commit": "8b05928ac1b9f2b772cedde891faa6669b0ec59a" }, "telescope-file-browser.nvim": { "branch": "master", "commit": "626998e5c1b71c130d8bc6cf7abb6709b98287bb" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "2a5ceff981501cff8f46871d5402cd3378a8ab6a" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, "telescope-live-grep-args.nvim": { "branch": "master", "commit": "b80ec2c70ec4f32571478b501218c8979fab5201" }, "telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, "thethethe.nvim": { "branch": "main", "commit": "357580127cd291c8a813564eeaff07c09303084e" }, - "tmux.nvim": { "branch": "main", "commit": "b2f509311e4cbdc06a93c0da66a8b7b33aa6bec9" }, + "tiny-inline-diagnostic.nvim": { "branch": "main", "commit": "0a3be9835c6044e8bbc1bdf001e3333519a2bad9" }, + "tmux.nvim": { "branch": "main", "commit": "2c1c3be0ef287073cef963f2aefa31a15c8b9cd8" }, "toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" }, "tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" }, "trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" }, "vim-arduino": { "branch": "master", "commit": "2ded67cdf09bb07c4805d9e93d478095ed3d8606" }, "vim-arsync": { "branch": "master", "commit": "dd5fd93182aafb67ede2ef465f379610980b52d3" }, "vim-dadbod": { "branch": "master", "commit": "9f0ca8bcef704659820a95c3bbd2c262583a66a1" }, - "vim-dadbod-completion": { "branch": "master", "commit": "464da308a988b5c8b136777a50182332b04f8d9f" }, - "vim-dadbod-ui": { "branch": "master", "commit": "f4d37b7312ae6489e5c04bee654ca521baac188a" }, + "vim-dadbod-completion": { "branch": "master", "commit": "a8dac0b3cf6132c80dc9b18bef36d4cf7a9e1fe6" }, + "vim-dadbod-ui": { "branch": "master", "commit": "685e75b34ee0e12f92ec4507ea8bb7f1aaa936e5" }, "vim-wakatime": { "branch": "master", "commit": "e46d7c4f98ee0f40782008dd60cb2a79c377fb1d" }, "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }, - "wtf.nvim": { "branch": "main", "commit": "16eec1f32c3608bd8519e9e520041fe34201abb0" } + "wtf.nvim": { "branch": "main", "commit": "22dac666c8847c9cb03afe99229d459f1d0822c4" } } diff --git a/nvim/.config/nvim/lsp/marksman.lua b/nvim/.config/nvim/lsp/marksman.lua new file mode 100644 index 0000000..dd75442 --- /dev/null +++ b/nvim/.config/nvim/lsp/marksman.lua @@ -0,0 +1,5 @@ +return { + cmd = { 'marksman' }, + root_markers = { './', }, + filetypes = { 'md', 'markdown' }, +} diff --git a/nvim/.config/nvim/lsp/ruff.lua b/nvim/.config/nvim/lsp/ruff.lua new file mode 100644 index 0000000..3c4208d --- /dev/null +++ b/nvim/.config/nvim/lsp/ruff.lua @@ -0,0 +1,5 @@ +return { + cmd = { 'ruff', 'server' }, + root_markers = { './', 'main.py' }, + filetypes = { 'py', 'python' }, +} diff --git a/nvim/.config/nvim/lua/core/keymaps.lua b/nvim/.config/nvim/lua/core/keymaps.lua index 87322b5..0097739 100644 --- a/nvim/.config/nvim/lua/core/keymaps.lua +++ b/nvim/.config/nvim/lua/core/keymaps.lua @@ -50,6 +50,12 @@ map('n', 'fc', ':set foldmethod=expr foldexpr=getline(v:lnum)=~"^\\s*".& map('n', '', ':ToggleTerm direction=float', default_opts) map('t', '', '', default_opts) -- Exit Insert Mode Faster +-- Tiny Code Action +-- map('n', "ca", function() require("tiny-code-action").code_action() end, default_opts) +vim.keymap.set("n", "ca", function() + require("tiny-code-action").code_action() +end, { noremap = true, silent = true }) + ------------------------------------------------ -- Old Keymaps from Nvim-Mapper (Sunsetted) ------------------------------------------------ diff --git a/nvim/.config/nvim/lua/core/settings.lua b/nvim/.config/nvim/lua/core/settings.lua deleted file mode 100644 index 32a99ac..0000000 --- a/nvim/.config/nvim/lua/core/settings.lua +++ /dev/null @@ -1,143 +0,0 @@ ------------------------------------------------------------ --- General Neovim settings and configuration ------------------------------------------------------------ - ------------------------------------------------------------ --- Neovim API aliases ------------------------------------------------------------ -local fn = vim.fn -- Call Vim functions -local cmd = vim.cmd -- Execute Vim commands -local exec = vim.api.nvim_exec -- Execute Vimscript -local g = vim.g -- Global variables -local opt = vim.opt -- Set options (global/buffer/windows-scoped) -local o = vim.o - ------------------------------------------------------------ --- General ------------------------------------------------------------ -g.mapleader = ',' -- Change leader to a comma -opt.mouse = 'a' -- Enable mouse support -opt.clipboard = 'unnamedplus' -- Copy/paste to system clipboard -opt.swapfile = false -- Don't use swapfile -opt.shadafile = "NONE" -opt.shadafile = "" -opt.shell = "/bin/zsh" -opt.updatetime = 200 -opt.cursorline = true -g.markdown_folding = 1 -opt.spell=true -opt.spelllang = 'en_us' -cmd [[ autocmd BufWritePre * :%s/\s\+$//e ]] ---vim.api.nvim_set_hl(0, "ColorColumn", {guibg=lightmagenta}) ------------------------------------------------------------ --- Neovim UI ------------------------------------------------------------ -opt.number = true -- Show line number -opt.relativenumber = true -- Show Current Line with Relative numbers above and below cursor. -opt.showmatch = true -- Highlight matching parenthesis -opt.foldmethod = "syntax" -- Enable folding (default 'foldmarker') -opt.colorcolumn = '99' -opt.textwidth = 100 --- opt.cc = '+1,+2,+3' -- Line length marker at 80 columns --- opt.tw = 120 -opt.splitright = true -- Vertical split to the right -opt.splitbelow = true -- Horizontal split to the bottom -opt.ignorecase = true -- Ignore case letters when search -opt.smartcase = true -- Ignore lowercase for the whole pattern -opt.linebreak = true -- Wrap on word boundary -opt.signcolumn = 'yes:1' -- Signs column always on, minimum 2. -opt.wrap = true - ------------------------------------------------------------ --- Memory, CPU ------------------------------------------------------------ -opt.hidden = true -- Enable background buffers -opt.history = 100 -- Remember N lines in historma:y -opt.lazyredraw = true -- Faster scrolling -opt.synmaxcol = 240 -- Max column for syntax highlight ------------------------------------------------------------ --- Colorscheme ------------------------------------------------------------ -opt.termguicolors = true -- Enable 24-bit RGB colors --- cmd[[colorscheme dracula]] ------------------------------------------------------------ --- Tabs, indent ------------------------------------------------------------ -opt.expandtab = true -- Use spaces instead of tabs -opt.shiftwidth = 4 -- Shift 4 spaces when tab -opt.tabstop = 4 -- 1 tab == 4 spaces -opt.smartindent = true -- Autoindent new lines ------------------------------------------------------------ --- Glow Settings ------------------------------------------------------------ -g.glow_binary_path = '/bin' -g.glow_border = 'rounded' -g.glow_width = 120 -g.glow_use_pager = true -g.glow_style = 'dark' ------------------------------------------------------------ --- MKDX Settings, mkdx#settings. ------------------------------------------------------------ --- 2 spaces for selected filetypes -cmd [[ - autocmd FileType md,liquid,xml,html,xhtml,css,scss,javascript,lua,yaml setlocal shiftwidth=2 tabstop=8 noexpandtab -]] - - -local disabled_built_ins = { - "netrw", - "netrwPlugin", - "netrwSettings", - "netrwFileHandlers", - "gzip", - "zip", - "zipPlugin", - "tar", - "tarPlugin", - "getscript", - "getscriptPlugin", - "vimball", - "vimballPlugin", - "2html_plugin", - "logipat", - "rrhelper", - "spellfile_plugin", - "matchit" -} - -for _, plugin in pairs(disabled_built_ins) do - vim.g["loaded_" .. plugin] = 1 -end - ---[[ -Deletes all trailing whitespaces in a file if it's not binary nor a diff. -]]-- -function _G.trim_trailing_whitespaces() - if not o.binary and o.filetype ~= 'diff' then - local current_view = fn.winsaveview() - cmd([[keeppatterns %s/\s\+$//e]]) - fn.winrestview(current_view) - end -end - --- see https://github.com/hrsh7th/nvim-cmp/wiki/Menu-Appearance#how-to-add-visual-studio-code-dark-theme-colors-to-the-menu -vim.cmd[[ - highlight! link CmpItemMenu Comment - " gray - highlight! CmpItemAbbrDeprecated guibg=NONE gui=strikethrough guifg=#808080 - " blue - highlight! CmpItemAbbrMatch guibg=NONE guifg=#569CD6 - highlight! CmpItemAbbrMatchFuzzy guibg=NONE guifg=#569CD6 - " light blue - highlight! CmpItemKindVariable guibg=NONE guifg=#9CDCFE - highlight! CmpItemKindInterface guibg=NONE guifg=#9CDCFE - highlight! CmpItemKindText guibg=NONE guifg=#9CDCFE - " pink - highlight! CmpItemKindFunction guibg=NONE guifg=#C586C0 - highlight! CmpItemKindMethod guibg=NONE guifg=#C586C0 - " front - highlight! CmpItemKindKeyword guibg=NONE guifg=#D4D4D4 - highlight! CmpItemKindProperty guibg=NONE guifg=#D4D4D4 - highlight! CmpItemKindUnit guibg=NONE guifg=#D4D4D4 - ]] - diff --git a/nvim/.config/nvim/lua/interface/popup.lua b/nvim/.config/nvim/lua/interface/popup.lua.backup similarity index 100% rename from nvim/.config/nvim/lua/interface/popup.lua rename to nvim/.config/nvim/lua/interface/popup.lua.backup diff --git a/nvim/.config/nvim/lua/interface/text.lua b/nvim/.config/nvim/lua/interface/text.lua.backup similarity index 100% rename from nvim/.config/nvim/lua/interface/text.lua rename to nvim/.config/nvim/lua/interface/text.lua.backup diff --git a/nvim/.config/nvim/lua/plugins/avante.lua b/nvim/.config/nvim/lua/plugins/avante.lua.backup similarity index 100% rename from nvim/.config/nvim/lua/plugins/avante.lua rename to nvim/.config/nvim/lua/plugins/avante.lua.backup diff --git a/nvim/.config/nvim/lua/plugins/blink.lua b/nvim/.config/nvim/lua/plugins/blink.lua index 012f612..d215da7 100644 --- a/nvim/.config/nvim/lua/plugins/blink.lua +++ b/nvim/.config/nvim/lua/plugins/blink.lua @@ -1,13 +1,18 @@ return { 'saghen/blink.cmp', lazy = false, -- lazy loading handled internally - version = '*', + version = '1.*', + ---@module 'blink.cmp' + ---@type blink.cmp.Config dependencies = { 'rafamadriz/friendly-snippets', 'L3MON4D3/LuaSnip', version = 'v2.*', "moyiz/blink-emoji.nvim", }, opts = { + -- chartoggle = { enabled = true }, + -- indent = { enabled = true }, + -- tree = { enabled = true }, keymap = { preset = "default", [''] = { 'show', 'show_documentation', 'hide_documentation' }, @@ -31,37 +36,39 @@ return { [''] = { 'scroll_documentation_down', 'fallback' }, }, appearance = { - use_nvim_cmp_as_default = true, - nerd_font_variant = 'normal', + -- use_nvim_cmp_as_default = true, + nerd_font_variant = 'mono', }, - completion = { - menu = { auto_show = function(ctx) return ctx.mode ~= 'cmdline' end }, + completion = {documentation = { auto_show = false }, + -- menu = { auto_show = function(ctx) return ctx.mode ~= 'cmdline' end }, -- keyword = { range = 'prefix', regex = '[%w_\\-]'}, -- trigger = { show_on_blocked_trigger_characters = function() -- if vim.api.nvim_get_mode().mode == 'c' then return {} end -- return { ' ', '\n', '\t' } -- end }, }, - snippets = { - expand = function(snippet) require('luasnip').lsp_expand(snippet) end, - active = function(filter) - if filter and filter.direction then - return require('luasnip').jumpable(filter.direction) - end - return require('luasnip').in_snippet() - end, - jump = function(direction) require('luasnip').jump(direction) end, - }, + -- snippets = { + -- expand = function(snippet) require('luasnip').lsp_expand(snippet) end, + -- active = function(filter) + -- if filter and filter.direction then + -- return require('luasnip').jumpable(filter.direction) + -- end + -- return require('luasnip').in_snippet() + -- end, + -- jump = function(direction) require('luasnip').jump(direction) end, + -- }, sources = { - default = {'lsp', 'path', 'snippets', 'buffer', 'emoji'}, - providers = { - emoji = { - module = "blink-emoji", - name = "Emoji", - score_offset = 15, -- Tune by preference - opts = { insert = true }, -- Insert emoji (default) or complete its name - }, - } - } - } + default = {'lsp', 'path', 'snippets', 'buffer'}, + -- providers = { + -- emoji = { + -- module = "blink-emoji", + -- name = "Emoji", + -- score_offset = 15, -- Tune by preference + -- opts = { insert = true }, -- Insert emoji (default) or complete its name + -- }, + -- } + }, + fuzzy = { implementation = "prefer_rust_with_warning" } + }, + opts_extend = { "sources.default" } } diff --git a/nvim/.config/nvim/lua/plugins/init.lua b/nvim/.config/nvim/lua/plugins/init.lua index 0faba0f..2a6b296 100755 --- a/nvim/.config/nvim/lua/plugins/init.lua +++ b/nvim/.config/nvim/lua/plugins/init.lua @@ -4,26 +4,32 @@ return { -- They should be pulled first! ----------------------------------------------------------------- -{'williamboman/mason.nvim', - config = function() require("mason").setup({ - ui = { - icons = { - package_installed = "✓", - package_pending = "➜", - package_uninstalled = "✗" - } - } - }) - end, - }, - { 'williamboman/mason-lspconfig.nvim', - config = function() require("mason-lspconfig").setup{} end, - }, - { 'neovim/nvim-lspconfig' }, +-- {'williamboman/mason.nvim', +-- config = function() require("mason").setup({ +-- ui = { +-- icons = { +-- package_installed = "✓", +-- package_pending = "➜", +-- package_uninstalled = "✗" +-- } +-- } +-- }) +-- end, +-- }, +-- { 'williamboman/mason-lspconfig.nvim', +-- config = function() require("mason-lspconfig").setup{ +-- ensure_installed = { "lua_ls", "ruff", "black" }, +-- } end, +-- }, { - 'hinell/lsp-timeout.nvim', - dependencies={ "neovim/nvim-lspconfig" } - }, + "rachartier/tiny-inline-diagnostic.nvim", + event = "LspAttach", -- Or `LspAttach` + priority = 1000, -- needs to be loaded in first + config = function() + require('tiny-inline-diagnostic').setup() + vim.diagnostic.config({ virtual_text = true, virtual_lines = true }) + end +}, { 'L3MON4D3/LuaSnip', version = "2.*", build = "make install_jsregexp", @@ -43,19 +49,18 @@ return { end, }, + -- Error: Command '['/Users/normrasmussen/.local/share/nvim/mason/packages/ruff/venv/bin/python3', '-m', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1. + ------------------------------------------------------------ -- General Functionality ------------------------------------------------------------ - -- lazy.nvim { "folke/noice.nvim", - -- event = "VeryLazy", opts = { }, dependencies = { - -- "MunifTanjim/nui.nvim", "rcarriga/nvim-notify", } }, @@ -86,24 +91,24 @@ return { }, -- A file explorer that lets you edit your filesystem like a normal Neovim buffer. - { - 'stevearc/oil.nvim', - opts = {}, - dependencies = { { "echasnovski/mini.icons", opts = {} } }, - }, + -- { + -- 'stevearc/oil.nvim', + -- opts = {}, + -- dependencies = { { "echasnovski/mini.icons", opts = {} } }, + -- }, -- vim plugin for asynchronous synchronisation of remote files and local files using rsync { 'kenn7/vim-arsync', dependencies={'prabirshrestha/async.vim'}, }, --The goal of nvim-ufo is to make Neovim's fold look modern and keep high performance. - {'kevinhwang91/nvim-ufo', requires = 'kevinhwang91/promise-async'}, + -- {'kevinhwang91/nvim-ufo', requires = 'kevinhwang91/promise-async'}, -- Open telescope and show files in the same directory as the current buffer. - { 'MaximilianLloyd/adjacent.nvim' }, + -- { 'MaximilianLloyd/adjacent.nvim' }, --You can use this plugin to run HTTP requests directly in your favorite text editor. - { 'BlackLight/nvim-http' }, + -- { 'BlackLight/nvim-http' }, -- Vim plugin for compiling, uploading, and debugging arduino sketches. -- It uses arduino-cli when available (recommended), and falls back to @@ -173,8 +178,9 @@ return { -- Rename and Work with Buffer & Tabs {'romgrk/barbar.nvim', - dependencies = { { "echasnovski/mini.icons", opts = {} } }, - version = '^1.0.0', -- optional: only update when a new 1.x version is released + dependencies = { { "echasnovski/mini.icons", opts = {} }, + { 'nvim-tree/nvim-web-devicons', opts = {} } + }, }, @@ -219,20 +225,16 @@ return { end }, -- Custom Terminal within Neovim - {'akinsho/toggleterm.nvim', version = "*", opts = { - direction = 'float', - }}, + {'akinsho/toggleterm.nvim', version = "*", + opts = { + direction = 'float', + } + }, ------------------------------------------------------------ -- echasnovski's Minis get a section of their own... ------------------------------------------------------------ - --- { 'echasnovski/mini.pick', version = '*', --- config = function() --- require('mini.pick').setup() --- end --- }, { 'echasnovski/mini.comment', version = '*', config = function() @@ -332,12 +334,12 @@ return { -- Text, Icons, Symbols ---------------------------------------------------------- - -- { - -- 'simrat39/symbols-outline.nvim', - -- config = function() - -- require('symbols-outline').setup() - -- end - -- }, + { + 'simrat39/symbols-outline.nvim', + config = function() + require('symbols-outline').setup() + end + }, { "j-hui/fidget.nvim", opts = { @@ -348,8 +350,8 @@ return { -- 'karb94/neoscroll.nvim', -- Allow Popups for Telescope etc - 'nvim-lua/popup.nvim', - 'nvim-lua/plenary.nvim', + -- 'nvim-lua/popup.nvim', + -- 'nvim-lua/plenary.nvim', -- Todo & Comments for Organization -- { @@ -448,27 +450,6 @@ return { opts = { }, }, { 'HiPhish/rainbow-delimiters.nvim' }, - { - "wookayin/semshi", - ft = "python", - build = ":UpdateRemotePlugins", - config = function() - vim.api.nvim_set_hl(0, "semshiLocal", { ctermfg=209, fg="#80aa9e" } ) - vim.api.nvim_set_hl(0, "semshiGlobal", { ctermfg=214, fg="#d3869b" } ) - vim.api.nvim_set_hl(0, "semshiImported", { ctermfg=214, fg="#8bba7f", cterm=bold, gui=bold } ) - vim.api.nvim_set_hl(0, "semshiParameter", { ctermfg=75, fg="#8bba7f" } ) - vim.api.nvim_set_hl(0, "semshiParameterUnused", { ctermfg=117, fg="#34381b", cterm=underline, gui=underline} ) - vim.api.nvim_set_hl(0, "semshiFree", { ctermfg=218, fg="#e9b143"} ) - vim.api.nvim_set_hl(0, "semshiBuiltin", { ctermfg=207, fg="#f2594b"} ) - vim.api.nvim_set_hl(0, "semshiAttribute", { ctermfg=49, fg="#3b4439"} ) - vim.api.nvim_set_hl(0, "semshiSelf", { ctermfg=249, fg="#db4740"} ) - vim.api.nvim_set_hl(0, "semshiUnresolved", { ctermfg=226, fg="#f28534", cterm=underline, gui=underline} ) - vim.api.nvim_set_hl(0, "semshiSelected", { ctermfg=231, fg="#ffffff", ctermbg=161, bg="#4c3432"} ) - vim.api.nvim_set_hl(0, "semshiErrorSign", { ctermfg=231, fg="#ffffff", ctermbg=160, bg="#402120"} ) - vim.api.nvim_set_hl(0, "semshiErrorChar", { ctermfg=231, fg="#ffffff", ctermbg=160, bg="#402120"} ) - vim.cmd([[sign define semshiError text=E> texthl=semshiErrorSign]]) - end - }, -- Wakatime Tracking 'wakatime/vim-wakatime', diff --git a/nvim/.config/nvim/lua/plugins/mason-null-ls.lua b/nvim/.config/nvim/lua/plugins/mason-null-ls.lua.backup similarity index 100% rename from nvim/.config/nvim/lua/plugins/mason-null-ls.lua rename to nvim/.config/nvim/lua/plugins/mason-null-ls.lua.backup diff --git a/nvim/.config/nvim/lua/plugins/nvim-lspconfig.lua b/nvim/.config/nvim/lua/plugins/nvim-lspconfig.lua index 9e9b47a..eb4375b 100644 --- a/nvim/.config/nvim/lua/plugins/nvim-lspconfig.lua +++ b/nvim/.config/nvim/lua/plugins/nvim-lspconfig.lua @@ -1,31 +1,41 @@ return { 'neovim/nvim-lspconfig', - config = function() + dependencies = { 'saghen/blink.cmp' }, + config = function() -- Setup language servers. local lspconfig = require('lspconfig') local configs = require('lspconfig.configs') - local capabilities = vim.lsp.protocol.make_client_capabilities() - capabilities.textDocument.completion.completionItem.snippetSupport = true - lspconfig.emmet_ls.setup{ - on_attach = on_attach, - capabilities = capabilities, - filetypes = { "css", "eruby", "html", "javascript", "javascriptreact", "less", "sass", "scss", "svelte", "pug", "typescriptreact", "vue", "liquid" }, - init_options = { - html = { - options = { - ["bem.enabled"] = true, - }, - }, - } - } - lspconfig.ruff.setup{ - on_attach = on_attach, - init_options = { - settings = { - args = {}, - } - } - } + -- local cap abilities = vim.lsp.protocol.make_client_capabilities() + local capabilities = require('blink.cmp').get_lsp_capabilities() + -- capabilities.textDocument.completion.completionItem.snippetSupport = true + -- lspconfig.emmet_ls.setup{ +-- on_attach = on_attach, +-- capabilities = capabilities, +-- filetypes = { "css", "eruby", "html", "javascript", "javascriptreact", "less", "sass", "scss", "svelte", "pug", "typescriptreact", "vue", "liquid" }, +-- init_options = { +-- html = { +-- options = { +-- ["bem.enabled"] = true, +-- }, +-- }, +-- } +-- } + -- lspconfig.ruff.setup({ + -- on_attach = on_attach, + -- filetypes = {"python"}, + -- init_options = { + -- settings = { + -- enable = true, + -- -- ignoreStandardLibrary = true, + -- -- organizeImports = true, + -- -- fixAll = true, + -- lint = { + -- enable = true, + -- run = 'onType', + -- } + -- } + -- } + -- }) -- Global mappings. -- See `:help vim.diagnostic.*` for documentation on any of the below functions @@ -33,36 +43,36 @@ return { vim.keymap.set('n', '[d', vim.diagnostic.goto_prev) vim.keymap.set('n', ']d', vim.diagnostic.goto_next) vim.keymap.set('n', 'q', vim.diagnostic.setloclist) - - -- Use LspAttach autocommand to only map the following keys - -- after the language server attaches to the current buffer - vim.api.nvim_create_autocmd('LspAttach', { - group = vim.api.nvim_create_augroup('UserLspConfig', {}), - callback = function(ev) - -- Enable completion triggered by - vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc' - - -- Buffer local mappings. - -- See `:help vim.lsp.*` for documentation on any of the below functions - local opts = { buffer = ev.buf } - vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts) - vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts) - vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts) - vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts) - vim.keymap.set('n', '', vim.lsp.buf.signature_help, opts) - vim.keymap.set('n', 'wa', vim.lsp.buf.add_workspace_folder, opts) - vim.keymap.set('n', 'wr', vim.lsp.buf.remove_workspace_folder, opts) - vim.keymap.set('n', 'wl', function() - print(vim.inspect(vim.lsp.buf.list_workspace_folders())) - end, opts) - vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, opts) - vim.keymap.set('n', 'rn', vim.lsp.buf.rename, opts) - vim.keymap.set({ 'n', 'v' }, 'ca', vim.lsp.buf.code_action, opts) - vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts) - vim.keymap.set('n', 'f', function() - vim.lsp.buf.format { async = true } - end, opts) - end, - }) + -- + -- -- Use LspAttach autocommand to only map the following keys + -- -- after the language server attaches to the current buffer + -- vim.api.nvim_create_autocmd('LspAttach', { + -- group = vim.api.nvim_create_augroup('UserLspConfig', {}), + -- callback = function(ev) + -- -- Enable completion triggered by + -- vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc' + -- + -- -- Buffer local mappings. + -- -- See `:help vim.lsp.*` for documentation on any of the below functions + -- local opts = { buffer = ev.buf } + -- vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts) + -- vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts) + -- vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts) + -- vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts) + -- vim.keymap.set('n', '', vim.lsp.buf.signature_help, opts) + -- vim.keymap.set('n', 'wa', vim.lsp.buf.add_workspace_folder, opts) + -- vim.keymap.set('n', 'wr', vim.lsp.buf.remove_workspace_folder, opts) + -- vim.keymap.set('n', 'wl', function() + -- print(vim.inspect(vim.lsp.buf.list_workspace_folders())) + -- end, opts) + -- vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, opts) + -- vim.keymap.set('n', 'rn', vim.lsp.buf.rename, opts) + -- vim.keymap.set({ 'n', 'v' }, 'ca', vim.lsp.buf.code_action, opts) + -- vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts) + -- vim.keymap.set('n', 'f', function() + -- vim.lsp.buf.format { async = true } + -- end, opts) + -- end, + -- }) end, } diff --git a/nvim/.config/nvim/lua/plugins/telescope.lua b/nvim/.config/nvim/lua/plugins/telescope.lua index a826776..25a3024 100644 --- a/nvim/.config/nvim/lua/plugins/telescope.lua +++ b/nvim/.config/nvim/lua/plugins/telescope.lua @@ -162,7 +162,6 @@ return { require("telescope").load_extension "file_browser" require("telescope").load_extension "live_grep_args" require("telescope").load_extension "fzf" - require("telescope").load_extension "adjacent" require("telescope").load_extension('cmdline') end }} diff --git a/nvim/.config/nvim/snippets/python.json b/nvim/.config/nvim/snippets/python.json index 1c1b22d..772d98f 100644 --- a/nvim/.config/nvim/snippets/python.json +++ b/nvim/.config/nvim/snippets/python.json @@ -3,5 +3,5 @@ "prefix": "pprint-import", "body": ["import pprint \n\n pp=pprint.PrettyPrinter(indent=4) \n\n pp.pprint(VARIABLE)"], "description": "Easily import, declare, and add a Pretty Print for easier reading." - }, + } } diff --git a/zsh/.zshrc b/zsh/.zshrc index 35c2051..aab7db4 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -1,22 +1,3 @@ -# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. -# Initialization code that may require console input (password prompts, [y/n] -# confirmations, etc.) must go above this block; everything else may go below. -if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then - source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" -fi - -# Ghostty shell integration for ZSH. This should be at the top of your zshrc! -# if [ -n "${GHOSTTY_RESOURCES_DIR}" ]; then -# builtin source "${GHOSTTY_RESOURCES_DIR}/shell-integration/zsh/ghostty-integration" -# fi - -# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. -# Initialization code that may require console input (password prompts, [y/n] -# confirmations, etc.) must go above this block; everything else may go below. -# if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then -# source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" -# fi - export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8 # autoload -Uz compinit; compinit; _comp_options+=(globdots); @@ -25,7 +6,7 @@ export LANG=en_US.UTF-8 export DOT="~/.dotfiles" alias vim='vim -S ~/.vimrc' alias nvim='nvim' -alias brew='env PATH="${PATH//$(pyenv root)\/shims:/}" brew' +# alias brew='env PATH="${PATH//$(pyenv root)\/shims:/}" brew' export CLICOLOR=1 export LSCOLORS=ExGxBxDxCxEgEdxbxgxcxd @@ -63,21 +44,9 @@ source ~/.dotfiles/zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh export PATH="/usr/local/opt/openssl/bin:$PATH" echo 'eval "$(uv generate-shell-completion zsh)"' >> ~/.zshrc -export NVM_DIR="$HOME/.nvm" -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm -[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion -eval "$(uv generate-shell-completion zsh)" -eval "$(uv generate-shell-completion zsh)" -eval "$(uv generate-shell-completion zsh)" - . "$HOME/.local/bin/env" -eval "$(uv generate-shell-completion zsh)" -eval "$(uv generate-shell-completion zsh)" -eval "$(uv generate-shell-completion zsh)" -eval "$(uv generate-shell-completion zsh)" -eval "$(uv generate-shell-completion zsh)" # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh -eval "$(uv generate-shell-completion zsh)" + eval "$(uv generate-shell-completion zsh)"