From 9c871ccf40095bd4b8348506a83d7e5e2752ad99 Mon Sep 17 00:00:00 2001 From: inorishio Date: Fri, 13 Feb 2026 11:10:09 +0100 Subject: [PATCH] The complete windows feel --- coc-settings.json | 55 ------ init.lua | 42 ++--- lua/autocmd.lua | 19 ++ lua/coc-settings.lua | 173 ------------------ lua/config/{ => ai}/blink.lua | 0 lua/config/{ => ai}/chatgpt.lua | 0 lua/config/{ => ai}/copilot.lua | 0 lua/config/{ => ai}/copilotchat.lua | 0 lua/config/{ => format}/TID.lua | 0 lua/config/{ => format}/cmp.lua | 0 lua/config/{ => format}/indent-blankline.lua | 0 lua/config/{ => format}/lspconfig.lua | 1 + lua/config/{ => format}/neoformat.lua | 0 lua/config/{ => format}/noice.lua | 0 lua/config/{ => format}/prettier.lua | 0 lua/config/{ => format}/refactoring.lua | 0 lua/config/{ => format}/texlab.lua | 0 lua/config/{ => terminal}/neovide.lua | 0 lua/config/{ => terminal}/tmux.lua | 0 lua/config/{ => terminal}/zterm-navigator.lua | 0 lua/config/{ => theme}/colorizer.lua | 0 lua/config/{ => theme}/gruvbox-baby.lua | 0 lua/config/{ => theme}/gruvbox.lua | 0 lua/config/{ => theme}/lualine.lua | 0 .../onedarkpro-light.lua} | 0 lua/globals.lua | 4 +- lua/mappings.lua | 60 ++---- lua/options.lua | 4 +- lua/plugins/init.lua | 60 ++---- lua/plugins/themes.lua | 30 ++- scripts/fWindows.ps1 | 86 +++++++++ scripts/windows_dependencies.ps1 | 42 ----- 32 files changed, 186 insertions(+), 390 deletions(-) delete mode 100644 coc-settings.json delete mode 100644 lua/coc-settings.lua rename lua/config/{ => ai}/blink.lua (100%) rename lua/config/{ => ai}/chatgpt.lua (100%) rename lua/config/{ => ai}/copilot.lua (100%) rename lua/config/{ => ai}/copilotchat.lua (100%) rename lua/config/{ => format}/TID.lua (100%) rename lua/config/{ => format}/cmp.lua (100%) rename lua/config/{ => format}/indent-blankline.lua (100%) rename lua/config/{ => format}/lspconfig.lua (99%) rename lua/config/{ => format}/neoformat.lua (100%) rename lua/config/{ => format}/noice.lua (100%) rename lua/config/{ => format}/prettier.lua (100%) rename lua/config/{ => format}/refactoring.lua (100%) rename lua/config/{ => format}/texlab.lua (100%) rename lua/config/{ => terminal}/neovide.lua (100%) rename lua/config/{ => terminal}/tmux.lua (100%) rename lua/config/{ => terminal}/zterm-navigator.lua (100%) rename lua/config/{ => theme}/colorizer.lua (100%) rename lua/config/{ => theme}/gruvbox-baby.lua (100%) rename lua/config/{ => theme}/gruvbox.lua (100%) rename lua/config/{ => theme}/lualine.lua (100%) rename lua/config/{themelight.lua => theme/onedarkpro-light.lua} (100%) create mode 100644 scripts/fWindows.ps1 delete mode 100644 scripts/windows_dependencies.ps1 diff --git a/coc-settings.json b/coc-settings.json deleted file mode 100644 index d63eaa0..0000000 --- a/coc-settings.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "suggest.noselect": true, - "suggest.enablePreselect": false, - "suggest.triggerAfterInsertEnter": true, - "inlineSuggest.autoTrigger": false, - "suggest.completionItemKindLabels": { - "text": "", - "method": "", - "function": "", - "constructor": "", - "field": "", - "variable": "", - "class": "", - "interface": "", - "module": "", - "property": "", - "unit": "", - "value": "", - "enum": "", - "keyword": "", - "snippet": "", - "color": "", - "file": "", - "reference": "", - "folder": "", - "enumMember": "", - "constant": "", - "struct": "", - "event": "", - "operator": "", - "typeParameter": "", - "default": "" - }, - "suggest.floatConfig": { - "maxWidth": 80, - "winblend": 1, - }, - "suggest.virtualText": false, - - "languageserver": { - "hyprlang": { - "command": "hyprls", - "filetypes": ["hyprlang"] - }, - "qml": { - "command": "qmlls6", - "filetypes": ["qml"] - } - }, - "git.addedSign.hlGroup": "GitGutterAdd", - "git.changedSign.hlGroup": "GitGutterChange", - "git.removedSign.hlGroup": "GitGutterDelete", - "coc.source.file.enable": true, - "coc.source.file.ignoreHidden": false, -} diff --git a/init.lua b/init.lua index 6f97917..2165ccc 100644 --- a/init.lua +++ b/init.lua @@ -1,39 +1,10 @@ -if vim.env.PROF then - local snacks = vim.fn.stdpath("data") .. "/lazy/snacks.nvim" - - vim.opt.rtp:append( snacks ) - require("snacks.profiler").startup({ - startup = { - event = "UIEnter", - }, - }) -end - -vim.api.nvim_create_autocmd({ 'VimLeavePre' }, { - group = vim.api.nvim_create_augroup('fuck_shada_temp', { clear = true }), - pattern = { '*' }, - callback = function() - local status = 0 - for _, f in ipairs(vim.fn.globpath(vim.fn.stdpath('data') .. '/shada', '*tmp*', false, true)) do - if vim.tbl_isempty(vim.fn.readfile(f)) then - status = status + vim.fn.delete(f) - end - end - if status ~= 0 then - vim.notify('Could not delete empty temporary ShaDa files.', vim.log.levels.ERROR) - vim.fn.getchar() - end - end, - desc = "Delete empty temp ShaDa files" -}) - -vim.cmd('source ' .. vim.fn.stdpath("config") .. "/cursor.vim") require("config.lazy") require("options") require("globals") require("mappings") require("autocmd") require("minimodules").load_modules() +vim.cmd('source ' .. vim.fn.stdpath("config") .. "/cursor.vim") if vim.g.neovide then require("config.neovide") @@ -45,3 +16,14 @@ vim.filetype.add({ [".*/uwsm/env.*"] = "zsh", } }) + +if vim.env.PROF then + local snacks = vim.fn.stdpath("data") .. "/lazy/snacks.nvim" + + vim.opt.rtp:append( snacks ) + require("snacks.profiler").startup({ + startup = { + event = "UIEnter", + }, + }) +end diff --git a/lua/autocmd.lua b/lua/autocmd.lua index 8da5beb..e34bd98 100644 --- a/lua/autocmd.lua +++ b/lua/autocmd.lua @@ -21,3 +21,22 @@ autocmd("BufWritePre", { vim.cmd "Neoformat" end, }) + +-- fWindows +autocmd("VimLeavePre", { + group = vim.api.nvim_create_augroup('fuck_shada_temp', { clear = true }), + pattern = { '*' }, + callback = function() + local status = 0 + for _, f in ipairs(vim.fn.globpath(vim.fn.stdpath('data') .. '/shada', '*tmp*', false, true)) do + if vim.tbl_isempty(vim.fn.readfile(f)) then + status = status + vim.fn.delete(f) + end + end + if status ~= 0 then + vim.notify('Could not delete empty temporary ShaDa files.', vim.log.levels.ERROR) + vim.fn.getchar() + end + end, + desc = "Delete empty temp ShaDa files" +}) diff --git a/lua/coc-settings.lua b/lua/coc-settings.lua deleted file mode 100644 index 3812e41..0000000 --- a/lua/coc-settings.lua +++ /dev/null @@ -1,173 +0,0 @@ -vimiopt.backup = false -vim.opt.writebackup = false -vim.opt.completeopt = "menuone,menu,noinsert,noselect,popup" -vim.opt.pumheight = 10 - -vim.opt.updatetime = 300 - -vim.opt.signcolumn = "yes" - -local keyset = vim.keymap.set -function _G.check_back_space() - local col = vim.fn.col('.') - 1 - return col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') ~= nil -end - --- Use Tab for trigger completion with characters ahead and navigate --- NOTE: There's always a completion item selected by default, you may want to enable --- no select by setting `"suggest.noselect": true` in your configuration file --- NOTE: Use command ':verbose imap ' to make sure Tab is not mapped by --- other plugins before putting this into your config -local opts = {silent = true, noremap = true, expr = true, replace_keycodes = false} -keyset("i", "", 'coc#pum#visible() ? coc#pum#next(0) : v:lua.check_back_space() ? "" : coc#refresh()', opts) -keyset("i", "", [[coc#pum#visible() ? coc#pum#prev(0) : "\"]], opts) - --- Make to accept selected completion item or notify coc.nvim to format --- u breaks current undo, please make your own choice - -keyset("i", "", [[coc#pum#visible() ? coc#pum#confirm() : "\u\\=coc#on_enter()\"]], opts) - --- Use to trigger snippets -keyset("i", "", "(coc-snippets-expand-jump)") --- Use to trigger completion -keyset("i", "", "coc#refresh()", {silent = true, expr = true}) - --- Use `[g` and `]g` to navigate diagnostics --- Use `:CocDiagnostics` to get all diagnostics of current buffer in location list -keyset("n", "[g", "(coc-diagnostic-prev)", {silent = true}) -keyset("n", "]g", "(coc-diagnostic-next)", {silent = true}) - --- GoTo code navigation -keyset("n", "gd", "(coc-definition)", {silent = true}) -keyset("n", "gy", "(coc-type-definition)", {silent = true}) -keyset("n", "gi", "(coc-implementation)", {silent = true}) -keyset("n", "gr", "(coc-references)", {silent = true}) - - --- Use K to show documentation in preview window -function _G.show_docs() - local cw = vim.fn.expand('') - if vim.fn.index({'vim', 'help'}, vim.bo.filetype) >= 0 then - vim.api.nvim_command('h ' .. cw) - elseif vim.api.nvim_eval('coc#rpc#ready()') then - vim.fn.CocActionAsync('doHover') - else - vim.api.nvim_command('!' .. vim.o.keywordprg .. ' ' .. cw) - end -end -keyset("n", "K", 'lua _G.show_docs()', {silent = true}) - - --- Highlight the symbol and its references on a CursorHold event(cursor is idle) -vim.api.nvim_create_augroup("CocGroup", {}) -vim.api.nvim_create_autocmd("CursorHold", { - group = "CocGroup", - command = "silent call CocActionAsync('highlight')", - desc = "Highlight symbol under cursor on CursorHold" -}) - - --- Symbol renaming -keyset("n", "rn", "(coc-rename)", {silent = true}) - - --- Formatting selected code -keyset("x", "f", "(coc-format-selected)", {silent = true}) -keyset("n", "f", "(coc-format-selected)", {silent = true}) - - --- Setup formatexpr specified filetype(s) -vim.api.nvim_create_autocmd("FileType", { - group = "CocGroup", - pattern = "typescript,json", - command = "setl formatexpr=CocAction('formatSelected')", - desc = "Setup formatexpr specified filetype(s)." -}) - --- Apply codeAction to the selected region --- Example: `aap` for current paragraph -local opts = {silent = true, nowait = true} -keyset("x", "a", "(coc-codeaction-selected)", opts) -keyset("n", "a", "(coc-codeaction-selected)", opts) - --- Remap keys for apply code actions at the cursor position. -keyset("n", "ac", "(coc-codeaction-cursor)", opts) --- Remap keys for apply source code actions for current file. -keyset("n", "as", "(coc-codeaction-source)", opts) --- Apply the most preferred quickfix action on the current line. -keyset("n", "qf", "(coc-fix-current)", opts) - --- Remap keys for apply refactor code actions. -keyset("n", "re", "(coc-codeaction-refactor)", { silent = true }) -keyset("x", "r", "(coc-codeaction-refactor-selected)", { silent = true }) -keyset("n", "r", "(coc-codeaction-refactor-selected)", { silent = true }) - --- Run the Code Lens actions on the current line -keyset("n", "cl", "(coc-codelens-action)", opts) - - --- Map function and class text objects --- NOTE: Requires 'textDocument.documentSymbol' support from the language server -keyset("x", "if", "(coc-funcobj-i)", opts) -keyset("o", "if", "(coc-funcobj-i)", opts) -keyset("x", "af", "(coc-funcobj-a)", opts) -keyset("o", "af", "(coc-funcobj-a)", opts) -keyset("x", "ic", "(coc-classobj-i)", opts) -keyset("o", "ic", "(coc-classobj-i)", opts) -keyset("x", "ac", "(coc-classobj-a)", opts) -keyset("o", "ac", "(coc-classobj-a)", opts) - - --- Remap and to scroll float windows/popups ----@diagnostic disable-next-line: redefined-local -local opts = {silent = true, nowait = true, expr = true} -keyset("n", "", 'coc#float#has_scroll() ? coc#float#scroll(1) : ""', opts) -keyset("n", "", 'coc#float#has_scroll() ? coc#float#scroll(0) : ""', opts) -keyset("i", "", - 'coc#float#has_scroll() ? "=coc#float#scroll(1)" : ""', opts) -keyset("i", "", - 'coc#float#has_scroll() ? "=coc#float#scroll(0)" : ""', opts) -keyset("v", "", 'coc#float#has_scroll() ? coc#float#scroll(1) : ""', opts) -keyset("v", "", 'coc#float#has_scroll() ? coc#float#scroll(0) : ""', opts) - - --- Use CTRL-S for selections ranges --- Requires 'textDocument/selectionRange' support of language server -keyset("n", "", "(coc-range-select)", {silent = true}) -keyset("x", "", "(coc-range-select)", {silent = true}) - - --- Add `:Format` command to format current buffer -vim.api.nvim_create_user_command("Format", "call CocAction('format')", {}) - --- " Add `:Fold` command to fold current buffer -vim.api.nvim_create_user_command("Fold", "call CocAction('fold', )", {nargs = '?'}) - --- Add `:OR` command for organize imports of the current buffer -vim.api.nvim_create_user_command("OR", "call CocActionAsync('runCommand', 'editor.action.organizeImport')", {}) - --- Add (Neo)Vim's native statusline support --- NOTE: Please see `:h coc-status` for integrations with external plugins that --- provide custom statusline: lightline.vim, vim-airline -vim.opt.statusline:prepend("%{coc#status()}%{get(b:,'coc_current_function','')}") - --- Mappings for CoCList --- code actions and coc stuff ----@diagnostic disable-next-line: redefined-local -local opts = {silent = true, nowait = true} --- Show all diagnostics -keyset("n", "a", ":CocList diagnostics", opts) --- Manage extensions -keyset("n", "m", ":CocList extensions", opts) --- Show commands -keyset("n", "c", ":CocList commands", opts) --- Find symbol of current document -keyset("n", "o", ":CocList outline", opts) --- Search workspace symbols -keyset("n", "s", ":CocList -I symbols", opts) --- Do default action for next item -keyset("n", "j", ":CocNext", opts) --- Do default action for previous item -keyset("n", "k", ":CocPrev", opts) --- Resume latest coc list -keyset("n", "p", ":CocListResume", opts) diff --git a/lua/config/blink.lua b/lua/config/ai/blink.lua similarity index 100% rename from lua/config/blink.lua rename to lua/config/ai/blink.lua diff --git a/lua/config/chatgpt.lua b/lua/config/ai/chatgpt.lua similarity index 100% rename from lua/config/chatgpt.lua rename to lua/config/ai/chatgpt.lua diff --git a/lua/config/copilot.lua b/lua/config/ai/copilot.lua similarity index 100% rename from lua/config/copilot.lua rename to lua/config/ai/copilot.lua diff --git a/lua/config/copilotchat.lua b/lua/config/ai/copilotchat.lua similarity index 100% rename from lua/config/copilotchat.lua rename to lua/config/ai/copilotchat.lua diff --git a/lua/config/TID.lua b/lua/config/format/TID.lua similarity index 100% rename from lua/config/TID.lua rename to lua/config/format/TID.lua diff --git a/lua/config/cmp.lua b/lua/config/format/cmp.lua similarity index 100% rename from lua/config/cmp.lua rename to lua/config/format/cmp.lua diff --git a/lua/config/indent-blankline.lua b/lua/config/format/indent-blankline.lua similarity index 100% rename from lua/config/indent-blankline.lua rename to lua/config/format/indent-blankline.lua diff --git a/lua/config/lspconfig.lua b/lua/config/format/lspconfig.lua similarity index 99% rename from lua/config/lspconfig.lua rename to lua/config/format/lspconfig.lua index f809067..17e941a 100644 --- a/lua/config/lspconfig.lua +++ b/lua/config/format/lspconfig.lua @@ -26,6 +26,7 @@ require("mason-lspconfig").setup { automatic_enable = true, ensure_installed = { "lua_ls", + "qmlls", "rust_analyzer", "gopls", }, diff --git a/lua/config/neoformat.lua b/lua/config/format/neoformat.lua similarity index 100% rename from lua/config/neoformat.lua rename to lua/config/format/neoformat.lua diff --git a/lua/config/noice.lua b/lua/config/format/noice.lua similarity index 100% rename from lua/config/noice.lua rename to lua/config/format/noice.lua diff --git a/lua/config/prettier.lua b/lua/config/format/prettier.lua similarity index 100% rename from lua/config/prettier.lua rename to lua/config/format/prettier.lua diff --git a/lua/config/refactoring.lua b/lua/config/format/refactoring.lua similarity index 100% rename from lua/config/refactoring.lua rename to lua/config/format/refactoring.lua diff --git a/lua/config/texlab.lua b/lua/config/format/texlab.lua similarity index 100% rename from lua/config/texlab.lua rename to lua/config/format/texlab.lua diff --git a/lua/config/neovide.lua b/lua/config/terminal/neovide.lua similarity index 100% rename from lua/config/neovide.lua rename to lua/config/terminal/neovide.lua diff --git a/lua/config/tmux.lua b/lua/config/terminal/tmux.lua similarity index 100% rename from lua/config/tmux.lua rename to lua/config/terminal/tmux.lua diff --git a/lua/config/zterm-navigator.lua b/lua/config/terminal/zterm-navigator.lua similarity index 100% rename from lua/config/zterm-navigator.lua rename to lua/config/terminal/zterm-navigator.lua diff --git a/lua/config/colorizer.lua b/lua/config/theme/colorizer.lua similarity index 100% rename from lua/config/colorizer.lua rename to lua/config/theme/colorizer.lua diff --git a/lua/config/gruvbox-baby.lua b/lua/config/theme/gruvbox-baby.lua similarity index 100% rename from lua/config/gruvbox-baby.lua rename to lua/config/theme/gruvbox-baby.lua diff --git a/lua/config/gruvbox.lua b/lua/config/theme/gruvbox.lua similarity index 100% rename from lua/config/gruvbox.lua rename to lua/config/theme/gruvbox.lua diff --git a/lua/config/lualine.lua b/lua/config/theme/lualine.lua similarity index 100% rename from lua/config/lualine.lua rename to lua/config/theme/lualine.lua diff --git a/lua/config/themelight.lua b/lua/config/theme/onedarkpro-light.lua similarity index 100% rename from lua/config/themelight.lua rename to lua/config/theme/onedarkpro-light.lua diff --git a/lua/globals.lua b/lua/globals.lua index f48e6e5..f569887 100644 --- a/lua/globals.lua +++ b/lua/globals.lua @@ -2,12 +2,12 @@ vim.g.loaded_netrw = 1 vim.g.loaded_netrwPlugin = 1 vim.g.base46_cache = vim.fn.stdpath "data" .. "/base46/" vim.g.mapleader = " " -vim.g.gruvbox_material_background = "medium" vim.g.coq_settings = { keymap = { recommended = false } } -vim.g.gruvbox_material_foreground = "original" vim.g.zig_fmt_parse_errors = 0 vim.g.zig_fmt_autosave = 0 vim.api.nvim_set_hl(0, 'GitGutterAdd', { fg = '#009900', ctermfg = 2 }) vim.api.nvim_set_hl(0, 'GitGutterChange', { fg = '#bbbb00', ctermfg = 3 }) vim.api.nvim_set_hl(0, 'GitGutterDelete', { fg = '#ff2222', ctermfg = 1 }) +-- vim.g.gruvbox_material_background = "medium" +-- vim.g.gruvbox_material_foreground = "original" diff --git a/lua/mappings.lua b/lua/mappings.lua index 1c32999..8eac304 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -1,68 +1,48 @@ local map = vim.keymap.set +-- Base nvim mappings, you need this. map("n", "", "BufferLineCycleNext") map("n", "", "BufferLineCyclePrev") - map({"n", "v"}, "ap", require("actions-preview").code_actions) - map("n", ";", ":", { desc = "CMD enter command mode" }) - --- Move selected text up map("v", "", ":m '<-2gv=gv", { desc = "Move selected text up" }) map("v", "", ":m '>+1gv=gv", { desc = "Move selected text down" }) +map("n", "", "ggVG", { noremap = true, silent = true }) +map("n", "", "zz") +map("n", "", "zz") +map("n", "", ":bdelete") +-- map("n", "", ":BufferRestore") +map('n', 'e', function() Snacks.explorer() end) +map('n', 'u', require('undotree').toggle, { noremap = true, silent = true }) +map("n", "g", require("telescope.builtin").live_grep, {desc = "Telescope grep" }) +map("n", "f", require("telescope.builtin").find_files, {desc = "Telescope find files" }) -- Copilot Chat buffer map("n", "", vim.cmd.CopilotChatToggle) map("i", "", vim.cmd.CopilotChatToggle) map("v", "", vim.cmd.CopilotChatToggle) --- Explorer and Undotree -map('n', 'e', function() Snacks.explorer() end) -map('n', 'u', require('undotree').toggle, { noremap = true, silent = true }) - --- Telescope grep -map("n", "g", require("telescope.builtin").live_grep, {desc = "Telescope grep" }) -map("n", "f", require("telescope.builtin").find_files, {desc = "Telescope find files" }) - -map("n", "", ":bdelete") --- map("n", "", ":BufferRestore") - -map("n", "", "ggVG", { noremap = true, silent = true }) - -map("n", "J", "mzJ`z") -map("n", "", "zz") -map("n", "", "zz") -map("n", "n", "nzzzv") -map("n", "N", "Nzzzv") +-- LSP Restart map("n", "zig", "LspRestart") --- greatest remap ever +-- Why? map("x", "p", [["_dP]]) - --- next greatest remap ever : asbjornHaland map({"n", "v"}, "y", [["+y]]) -map("n", "Y", [["+Y]]) - map({"n", "v"}, "d", "\"_d") - --- This is going to get me cancelled -map("i", "", "") - map("n", "mr", "CellularAutomaton make_it_rain"); - map("n", "", function() vim.cmd("so") end) -map("n", "", "ChatGPT") - -map("n", "fm", "TailwindConcealToggle", { desc = "Toggle Tailwind Conceal" }) - --- Terminal +-- Greatest remap +map("n", "Y", [["+Y]]) map("n", "", function() Snacks.terminal.toggle() end, { desc = "Toggle Terminal" }) - --- Gitbrowse map("n", "gb", function() Snacks.gitbrowse.open() end ) +map("n", "K", require("pretty_hover").hover) + +-- Might delete later +map("n", "fm", "TailwindConcealToggle", { desc = "Toggle Tailwind Conceal" }) +map("n", "", "ChatGPT") -- Notif history map("n", "n", function() @@ -71,5 +51,3 @@ end) -- Actions Previewer map({ "n", "v" }, "ap", require("actions-preview").code_actions) - -map("n", "K", require("pretty_hover").hover) diff --git a/lua/options.lua b/lua/options.lua index 2d83207..6dc5822 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -3,9 +3,8 @@ vim.opt.relativenumber = true vim.opt.tabstop = 4 vim.opt.softtabstop = 4 vim.opt.shiftwidth = 4 -vim.opt.expandtab = false +vim.opt.expandtab = true vim.opt.smartindent = false ---vim.opt.rocks.enabled = false vim.o.list = true vim.opt.listchars = { tab = "··", trail = "·", nbsp = "_" } @@ -55,5 +54,4 @@ vim.env.PATH = table.concat({ vim.fn.stdpath "data", "mason", "bin" }, sep) .. d vim.api.nvim_set_hl( 0, "Cursor", { reverse = true }) --- vim-tpipeline vim.g.tpipeline_restore = 1 diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index fb906ac..accb71c 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -1,4 +1,7 @@ return { + { + require("config.snacks") + }, { "nvim-mini/mini.nvim", version = false, @@ -48,23 +51,6 @@ return { require("config.barbar") end, }, - { - "nvim-lualine/lualine.nvim", - event = "VeryLazy", - config = function () - if vim.env.TMUX then - vim.api.nvim_create_autocmd({ "FocusGained", "ColorScheme", "VimEnter" }, { - callback = function() - vim.defer_fn( function() - vim.opt.laststatus = 0 - end, 100) - end, - }) - vim.o.laststatus = 0 - end - require("config.lualine") - end, - }, { "mawkler/modicator.nvim", config = function() @@ -105,7 +91,7 @@ return { cmd = "Copilot", event = "InsertEnter", config = function() - require "config.copilot" + require "config.ai.copilot" end, }, { @@ -116,7 +102,7 @@ return { }, build = "make tiktoken", config = function() - require "config.copilotchat" + require "config.ai.copilotchat" end, }, { @@ -125,19 +111,13 @@ return { require("config.dapconf") end, }, - { - require("config.snacks") - }, - { - "notken12/base46-colors", - }, { "mason-org/mason-lspconfig.nvim", - -- opts = {}, - -- dependencies = { - -- { "mason-org/mason.nvim", opts = {} }, - -- "neovim/nvim-lspconfig", - -- }, + opts = {}, + dependencies = { + { "mason-org/mason.nvim", opts = {} }, + "neovim/nvim-lspconfig", + }, }, { "folke/lazydev.nvim", @@ -164,7 +144,7 @@ return { "saghen/blink.cmp", }, config = function() - require("config.lspconfig") + require("config.format.lspconfig") end, }, { @@ -182,12 +162,6 @@ return { { "mfussenegger/nvim-jdtls", }, - { - "catgoose/nvim-colorizer.lua", - config = function() - require("config.colorizer") - end, - }, { "ziglang/zig.vim", }, @@ -201,7 +175,7 @@ return { { "f3fora/nvim-texlabconfig", config = function() - require("config.texlab") + require("config.format.texlab") end, build = "go build", }, @@ -220,7 +194,7 @@ return { { "ThePrimeagen/refactoring.nvim", config = function() - require("config.refactoring") + require("config.format.refactoring") end, }, { @@ -233,13 +207,13 @@ return { { "aserowy/tmux.nvim", config = function() - require("config.tmux") + require("config.terminal.tmux") end, }, { "rachartier/tiny-inline-diagnostic.nvim", config = function () - require("config.TID") + require("config.format.TID") end, }, { @@ -261,13 +235,13 @@ return { { "sbdchd/neoformat", config = function() - require("config.neoformat") + require("config.format.neoformat") end, }, { "Zacharias-Brohn/zterm-navigator.nvim", config = function() - require("config.zterm-navigator") + require("config.terminal.zterm-navigator") end, }, { diff --git a/lua/plugins/themes.lua b/lua/plugins/themes.lua index fee78a0..510e02c 100644 --- a/lua/plugins/themes.lua +++ b/lua/plugins/themes.lua @@ -1,9 +1,37 @@ return { { + "notken12/base46-colors", + }, + { + "nvim-lualine/lualine.nvim", + event = "VeryLazy", + config = function () + if vim.env.TMUX then + vim.api.nvim_create_autocmd({ "FocusGained", "ColorScheme", "VimEnter" }, { + callback = function() + vim.defer_fn( function() + vim.opt.laststatus = 0 + end, 100) + end, + }) + vim.o.laststatus = 0 + end + require("config.theme.lualine") + end, + }, + { + "catgoose/nvim-colorizer.lua", + config = function() + require("config.theme.colorizer") + end, + }, + { "olimorris/onedarkpro.nvim", + enabled = false, priority = 1000, config = function() - require("config.themelight") + require("config.theme.onedarkpro-light + ") end, }, } diff --git a/scripts/fWindows.ps1 b/scripts/fWindows.ps1 new file mode 100644 index 0000000..e30b3d5 --- /dev/null +++ b/scripts/fWindows.ps1 @@ -0,0 +1,86 @@ +Write-Host "NVIM setup script for Windows" -ForegroundColor Green +Write-Host "Installing winget packages" -foregroundcolor cyan + +$packages = @( + "Neovim.Neovim", + "MartinStorsjo.LLVM-MinGW.MSVCRT", + "zig.zig", + "GnuWin32.Make", + "Rustlang.Rust.MSVC", + "GoLang.Go", + "Kitware.Cmake", + "Ninja-build.Ninja", + "LuaLS.lua-language-server" +) + +for ($i = 0; $i -lt $packages.Count; $i++) { + $index = $i + 1 + Write-Host ("{0,4}) {1}" -f $index, $packages[$i]) -foreground yellow + winget install $package +} + +if ( !(Get-Command cargo -ErrorAction SilentlyContinue) ) { + Write-Host "Cargo is not installed. Please install Rust to proceed." -ForegroundColor Red + return +} else { + Write-Host "Installing cargo package treesitter-cli" -foregroundcolor cyan + cargo install --locked tree-sitter-cli +} + +$list = @( + "Git.Git", + "ajeetdsouza.zoxide" +) + +Write-Host "`nOptional packages to install:`n" -ForegroundColor Magenta + +for ($i = 0; $i -lt $list.Count; $i++) { + $index = $i + 1 + Write-Host "$index) $($list[$i])" -ForegroundColor Magenta +} + +Write-Host "`nInstall all packages? [Y]es / [N]o / [E]dit list: " -ForegroundColor Green -NoNewLine +$answer = Read-Host + +switch ($answer.ToLower()) { + + "y" { + $selected = $list + } + + "n" { + Write-Host "No packages will be installed." -ForegroundColor Red + return + } + + "e" { + Write-Host "`nEnter numbers to EXCLUDE (space separated, e.g. 2 3): " -ForegroundColor Yellow -NoNewLine + $excludeInput = Read-Host + + $excludeIndexes = $excludeInput -split "\s+" | ForEach-Object { [int]$_ - 1 } + + $selected = @() + for ($i = 0; $i -lt $list.Count; $i++) { + if ($excludeIndexes -notcontains $i) { + $selected += $list[$i] + } + } + } + + default { + Write-Host "Invalid option. Exiting." -ForegroundColor Red + return + } +} + +if ($selected.Count -eq 0) { + Write-Host "Nothing to install." -ForegroundColor Red + return +} + +Write-Host "`nInstalling selected packages:`n" -ForegroundColor Cyan + +foreach ($module in $selected) { + Write-Host "Installing $module..." -ForegroundColor Yellow + winget install --id $module +} diff --git a/scripts/windows_dependencies.ps1 b/scripts/windows_dependencies.ps1 deleted file mode 100644 index f9d0a53..0000000 --- a/scripts/windows_dependencies.ps1 +++ /dev/null @@ -1,42 +0,0 @@ -Write-Host "installing required packages for nvim" -foregroundcolor cyan - -$packages = @( - "Neovim.Neovim", - "MartinStorsjo.LLVM-MinGW.MSVCRT", - "zig.zig", - "GnuWin32.Make", - "Rustlang.Rust.MSVC", - "GoLang.Go", - "Kitware.Cmake", - "Ninja-build.Ninja", - "LuaLS.lua-language-server" -) - -# cargo install --locked tree-sitter-cli - -foreach ( $package in $packages ) { - Write-Host "Installing $package..." -foregroundcolor yellow - # winget install $package -} - -$list = @( - "Git.Git", - "ajeetdsouza.zoxide" -) - -Write-Host "Module list" -ForegroundColor Magenta -for ($i = 0; $i -lt $list.Count; $i++) { - $index = $i + 1 - Write-Host "$index) $($list[$i])" -ForegroundColor Magenta -} - -Write-Host "Do you want to install the above modules for PowerShell (y/n)? " -ForegroundColor Green -NoNewLine -$answer = Read-Host - -if ($answer -eq 'y' -or $answer -eq 'Y') { - foreach ($module in $list) { - Write-Host "Installing $module..." -ForegroundColor Yellow - # winget install --id $module -e - } - return -}