add bacon and needed config for bacon lsp
remove old lua configs for nvim
remove dotfiles bcs now handled by nix
reorganise packages a bit
RXJH46XLP6AFSIZZD4WEQA5A5YZLKHZ54ZUGCRH7TRAOH2Z4Q2VQC 35DXF42AUOL5WQKIBZNJMYRKC3HZHKNNDKYX4WTXV5UEJ2NLBOHQC WRZ7ISE3YY7EIZPX3YOQOGZ3R6O3E5XEFB7SV74JC3WBSWZZAEVQC N5ALVOYNQ6W3SDWKSVYTQHTFEJOCB2LXJQ4ANZFAJ5JNZFGAKK4AC 526CRD2QD6NF6N6PQUNWZT6UUGNLMC25UYNIO7ZFUCPQCUALYN4QC 5G7WRBMWKG6DMCOHE6WQHTYZACUHO2UPBZRWN72CFH7P45NN5E7QC GJHFP6NWDX4JTRENJY2LOUPIIJY5J7ZVOBGGJJQNK3VBCSR5WNXQC I4HWXLAAKJHZUQFV23XBAAEW6VTCOXO2F3AB5R6RTOHHZBZLK2VAC KXYLAJ5WZIXV5FQ4TU3IPHCO2YRKQBAZBW27LOA5EVWI2OLVPIIAC BJ5I57ZLQES5S3HH7WW3Z4CZSBOU4GQVR4JWFXQ7T2TKVIFGG6QAC AH6HSGEDTDCT77KUZXFSBB3U22PORVZ2RFGEN2DHYJNUHG6UWDPAC return {cmd = { "astro-ls", "--stdio" },filetypes = { "astro" },root_markers = { "package.json", "bun.lock", "tsconfig.json" },settings = {},init_options = {typescript = {tsdk = "node_modules/typescript/lib",},},}
return {cmd = { "bacon-ls" },filetypes = { "rust" },root_markers = { "Cargo.toml", "Cargo.lock", ".bacon-locations" },settings = {init_options = {locationsFile = ".bacon-locations",updateOnSave = true,updateOnSaveWaitMillis = 100,runBaconInBackground = true,synchronizeAllOpenFilesWaitMillis = 1000,},},}
return {capabilities = capabilities,cmd = { "gopls" },root_markers = { "go.mod", "go.sum" },filetypes = { "go" },-- init_options = {-- usePlaceholders = true,-- },settings = {experimentalPostfixCompletions = true,gofumpt = true,staticcheck = true,completeUnimported = true,usePlaceholders = true,semanticTokens = true,-- stylua: ignore startanalyses = { -- all good analyses are enabledshadow = true, QF1005 = true, QF1006 = true, QF1007 = true, QF1011 = true, S1002 = true, S1005 = true, S1006 = true, S1008 = true, S1009 = true, S1011 = true, S1016 = true, S1021 = true, S1029 = true, SA1000 = true, SA1002 = true, SA1003 = true, SA1007 = true, SA1010 = true, SA1011 = true, SA1014 = true, SA1015 = true, SA1017 = true, SA1018 = true, SA1020 = true, SA1021 = true, SA1023 = true, SA1024 = true, SA1025 = true, SA1026 = true, SA1027 = true, SA1028 = true, SA1030 = true, SA1031 = true, SA1032 = true, SA2002 = true, SA2003 = true, SA4005 = true, SA4006 = true, SA4008 = true, SA4009 = true, SA4010 = true, SA4012 = true, SA4015 = true, SA4017 = true, SA4018 = true, SA4023 = true, SA4031 = true, SA5000 = true, SA5002 = true, SA5005 = true, SA5007 = true, SA5010 = true, SA5011 = true, SA5012 = true, SA6000 = true, SA6001 = true, SA6002 = true, SA6003 = true, SA9001 = true, SA9003 = true, SA9005 = true, SA9007 = true, SA9008 = true,},-- stylua: ignore endcodelenses = {run_govulncheck = true,},vulncheck = "Imports",},}
return {cmd = { "lua-language-server" },filetypes = { "lua" },settings = {Lua = {diagnostics = {globals = { "vim" },},workspace = {checkThirdParty = true,library = vim.api.nvim_get_runtime_file("", true),},},},}
return {cmd = { "rust-analyzer" },filetypes = { "rust" },root_markers = { "Cargo.toml", "Cargo.lock" },settings = {["rust-analyzer"] = {assist = {preferSelf = true,},lens = {references = {adt = {enable = true,},enumVariant = {enable = true,},method = {enable = true,},trait = {enable = true,all = true,},},},semanticHighlighting = {operator = {specialization = {enable = true,},},punctuation = {enable = true,separate = {macro = {enable = true,},},specialization = {enable = true,},},},inlayHints = {bindingModeHints = {enable = true,},closureCaptureHints = {enable = true,},closureReturnTypeHints = {enable = true,},discriminantHints = {enable = true,},expressionAdjustmentHints = {enable = true,},genericParameterHints = {lifetime = {enable = true,},type = {enable = true,},},implicitDrops = {enable = true,},implicitSizedBoundHints = {enable = true,},lifetimeElisionHints = {useParameterNames = true,enable = true,},rangeExclusiveHints = {enable = true,},},-- checkOnSave and diagnostics must be disabled for bacon-lscheckOnSave = {command = "clippy",enable = true,},diagnostics = {enable = true,experimental = {enable = true,},styleLints = {enable = true,},},hover = {actions = {references = {enable = true,},},show = {enumVariants = 10,fields = 10,traitAssocItems = 10,},},interpret = {tests = true,},cargo = {features = "all",},completion = {hideDeprecated = true,fullFunctionSignatures = {enable = true,},},},},}
return {cmd = { "bunx", "--bun", "typescript-language-server", "--stdio" },root_markers = { "package.json", "bun.lock", "package-lock.json" },init_options = {plugins = {{name = "@vue/typescript-plugin",location = vim.fn.exepath("vue-language-server"),languages = { "vue" },},},},filetypes = {"typescript","javascript","javascriptreact","typescriptreact","vue",},}
return {filetypes = { "yaml" },settings = {yaml = {schemaStore = {-- You must disable built-in schemaStore support if you want to use-- this plugin and its advanced options like `ignore`.enable = false,-- Avoid TypeError: Cannot read properties of undefined (reading 'length')url = "",},schemas = require("schemastore").yaml.schemas(),},},}
-- Trailing whitespace highlightSET_HL(0, "ws", { bg = "red" })vim.fn.matchadd("ws", [[\s\+$]])AUTOCMD("InsertEnter", {callback = function()vim.fn.clearmatches()end,})AUTOCMD("InsertLeave", {callback = function()vim.fn.matchadd("ws", [[\s\+$]])end,})-- Yank highlightAUTOCMD("TextYankPost", {callback = function()vim.highlight.on_yank({ higroup = "Visual", timeout = 500 })end,})-- Auto-resize windowsAUTOCMD("VimResized", {pattern = "*",callback = function()CMD("wincmd =")end,})-- Remove trailing whitespace on saveAUTOCMD("BufWritePre", {pattern = "*",command = [[%s/\s\+$//e]],})
-- Global variablesCMD = vim.cmdAUTOCMD = vim.api.nvim_create_autocmdAUGROUP = vim.api.nvim_create_augroupCREATE_CMD = vim.api.nvim_create_user_commandMAP = vim.keymap.setSET_HL = vim.api.nvim_set_hl-- Global functionsfunction ColorMyPencils(color, theme, transparent)vim.o.background = theme or "light"CMD.colorscheme(color or "default")require("fidget").notify("background: ".. vim.o.background.. "\n theme: ".. theme.. "\n colorscheme: ".. color)-- general tweaksif transparent thenSET_HL(0, "Normal", { bg = "none" })SET_HL(0, "NormalFloat", { bg = "none" })SET_HL(0, "NormalNC", { bg = "none" })endif theme == "dark" thenSET_HL(0, "LineNrAbove", { fg = "#BFBFBF", bold = false })SET_HL(0, "LineNr", { fg = "white", bold = true })SET_HL(0, "LineNrBelow", { fg = "#BFBFBF", bold = false })endSET_HL(0, "LspInlayHint", { fg = "#808080" })-- fixes for colorschemesif color == "rusticated" then FixRusticated() endif color == "rasmus" then FixRasmus() endendfunction DisableItalic()local hl_groups = vim.api.nvim_get_hl(0, {})for key, hl_group in pairs(hl_groups) doif hl_group.italic thenSET_HL(0, key, vim.tbl_extend("force", hl_group, { italic = false }))endendendfunction DisableBold()local hl_groups = vim.api.nvim_get_hl(0, {})for key, hl_group in pairs(hl_groups) doif hl_group.bold thenSET_HL(0, key, vim.tbl_extend("force", hl_group, { bold = false }))endendendfunction DisableUndercurl()local highlights = {DiagnosticUnderlineError = { undercurl = false, underline = true },DiagnosticUnderlineWarn = { undercurl = false, underline = true },DiagnosticUnderlineInfo = { undercurl = false, underline = true },DiagnosticUnderlineHint = { undercurl = false, underline = true },}for group, opts in pairs(highlights) doSET_HL(0, group, opts)endendfunction FixRasmus()local highlights = {SpellBad = { undercurl = false, underline = true },SpellCap = { undercurl = false, underline = true },SpellLocal = { undercurl = false, underline = true },SpellRare = { undercurl = false, underline = true },DiffAdd = { reverse = false },DiffChange = { reverse = false },DiffDelete = { reverse = false },}for group, opts in pairs(highlights) doSET_HL(0, group, opts)endendfunction FixRusticated()SET_HL(0, "DiffAdd", {fg = "#1e1e1e",bg = "#98c379",})SET_HL(0, "DiffAdded", {fg = "#1e1e1e",bg = "#98c379",})SET_HL(0, "DiffTextAdd", {fg = "#1e1e1e",bg = "#98c379",})SET_HL(0, "DiffText", {fg = "#1e1e1e",bg = "#98c379",})endreturn {}
-- Bootstrap lazy.nvimlocal lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"if not (vim.uv or vim.loop).fs_stat(lazypath) thenlocal out = vim.fn.system({"git","clone","--filter=blob:none","--branch=stable","https://github.com/folke/lazy.nvim.git",lazypath,})if vim.v.shell_error ~= 0 thenvim.api.nvim_echo({{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },{ out, "WarningMsg" },{ "\nPress any key to exit..." },}, true, {})vim.fn.getchar()os.exit(1)endendvim.opt.rtp:prepend(lazypath)-- Setup lazy.nvimrequire("lazy").setup({lockfile = vim.fn.stdpath("data") .. "/lazy-lock.json",spec = {{ import = "themes" },{ import = "plugins" },{ import = "lsp" },},change_detection = { notify = false },-- Configure any other settings here. See the documentation for more details.-- colorscheme that will be used when installing plugins.install = { colorscheme = { "auto" } },-- automatically check for plugin updateschecker = { enabled = true, notify = true, concurrency = 24 },ui = { border = "single", backdrop = 95 },performance = {rtp = {disabled_plugins = {"gzip","netrwPlugin","tarPlugin","tohtml","tutor","zipPlugin","matchit","rplugin",},},},})AUTOCMD("VimEnter", {callback = function()require("lazy").update({ show = false })end,})
local lsp = vim.lsplsp.set_log_level("off")local c = vim.tbl_deep_extend("force",{},vim.lsp.protocol.make_client_capabilities(),require("blink.cmp").get_lsp_capabilities())lsp.config["*"] = {capabilities = c,root_markers = { ".git" },}lsp.enable({"astro",-- "bacon-ls","gopls","json_ls","lua_ls","nushell","rust_analyzer","svelteserver","tailwindcss","ts_ls","yamlls",})local orig_util_open_floating_preview = lsp.util.open_floating_previewfunction lsp.util.open_floating_preview(contents, syntax, opts, ...)opts = opts or {}opts.border = opts.border or "single"opts.max_width = opts.max_width or 60opts.focusable = opts.focusable or falsereturn orig_util_open_floating_preview(contents, syntax, opts, ...)end-- trying tiny-inline-diagnostic.nvim for a while-- AUTOCMD("CursorHold", {-- callback = function()-- vim.diagnostic.open_float()-- end,-- })local function reload_lsp()CMD("lua vim.lsp.stop_client(vim.lsp.get_clients())")local function check_and_reload()if not lsp.buf_is_attached(0) thenCMD.edit()elsevim.defer_fn(check_and_reload, 50)endendvim.defer_fn(check_and_reload, 50)endCREATE_CMD("LspReload", reload_lsp, { desc = "Reload attached LSP" })AUTOCMD("LspAttach", {callback = function(args)vim.diagnostic.config({update_in_insert = false,virtual_text = false,float = {focusable = false,border = "rounded",source = "always",header = "",prefix = "",},})local client = lsp.get_client_by_id(args.data.client_id)MAP("n", "<leader>ih", function()if vim.lsp.inlay_hint.is_enabled() thenvim.lsp.inlay_hint.enable(false)elsevim.lsp.inlay_hint.enable(true)endend)if client:supports_method("textDocument/foldingRange") thenvim.wo.foldmethod = "expr"vim.wo.foldexpr = "v:lua.vim.lsp.foldexpr()"elsevim.wo.foldmethod = "indent"endMAP("n", "gd", function()lsp.buf.definition()end, { desc = "Go to definition" })MAP("n", "gr", function()lsp.buf.references()end, { desc = "Show references" })MAP("n", "grn", function()lsp.buf.rename()end, { desc = "vim.lsp rename" })MAP("n", "gi", function()lsp.buf.implementation()end, { desc = "vim.lsp implementation" })MAP({ "n", "v" }, "ga", function()lsp.buf.code_action()end, { desc = "vim.lsp code action" })MAP("n", "K", function()lsp.buf.hover()end, { desc = "Hover" })end,})return {}"nixd",
return {-- "X3eRo0/dired.nvim",-- dependencies = { "MunifTanjim/nui.nvim" },-- keys = {-- {-- "<C-s>",-- function()-- if vim.bo.filetype == "dired" then-- CMD("DiredQuit")-- else-- CMD("Dired")-- end-- end,-- desc = "Open Dired",-- },-- {-- "-",-- ":Dired<cr>",-- desc = "Open Dired",-- },-- },-- opts = {-- hide_details = false,-- sort_order = "dirs",-- show_icons = false,-- show_hidden = true,-- show_banner = true,-- },}
return {-- "mrcjkb/rustaceanvim",-- version = "^6",-- lazy = false,-- init = function()-- vim.g.rustaceanvim = {-- tools = {-- test_executor = "background",-- },-- server = {-- default_settings = {-- ["rust-analyzer"] = {-- -- checkOnSave and diagnostics must be disabled for bacon-ls-- checkOnSave = {-- command = "clippy",-- enable = true,-- },-- diagnostics = {-- enable = true,-- experimental = {-- enable = true,-- },-- styleLints = {-- enable = true,-- },-- },-- hover = {-- actions = {-- references = {-- enable = true,-- },-- },-- },-- interpret = {-- tests = true,-- },-- cargo = {-- features = "all",-- },-- completion = {-- fullFunctionSignatures = {-- enable = true,-- },-- },-- },-- },-- },-- dap = {},-- }-- end,}
return {"leath-dub/snipe.nvim",keys = {{"<leader>fb",function()require("snipe").open_buffer_menu()end,desc = "Open buffer menu",},},opts = {ui = {position = "topleft",open_win_override = {title = "",border = "single",},},},}
return {"shortcuts/no-neck-pain.nvim",lazy = false,priority = 1001,opts = {width = 110,autocmds = {enableOnVimEnter = true,skipEnteringNoNeckPainBuffer = true,},buffers = {wo = {fillchars = "eob: ",},},},}
return {"nvim-treesitter/nvim-treesitter-context",event = "BufRead",opts = {max_lines = 3,separator = "-",},config = function()SET_HL(0, "TreesitterContextLineNumberBottom", {fg = "#FFFFFF",})SET_HL(0, "TreesitterContextSeparator", {fg = "#363636",})end,}
return {"elihunter173/dirbuf.nvim",cmd = "Dirbuf",keys = {{"<C-s>",function()if vim.bo.filetype == "dirbuf" thenCMD("DirbufQuit")elseCMD("Dirbuf")endend,desc = "Open dirbuf",},{"-",":Dirbuf<CR>",},},opts = {sort_order = "directories_first",write_cmd = "DirbufSync -confirm",show_hidden = true,},}
return {"echasnovski/mini.bufremove",event = "BufRead",opts = {},keys = {{"<leader>qb",function()CMD("lua MiniBufremove.delete()")end,desc = "close buffer",},},}
return {"nvim-telescope/telescope.nvim",keys = {{"<leader>fc",function()require("telescope.builtin").resume()end,desc = "resume last picker",},{"<leader>ff",function()require("telescope.builtin").find_files()end,desc = "fuzzy files",},{"<leader>fg",function()require("telescope.builtin").live_grep()end,desc = "fuzzy live grep",},{"<leader>ft",function()require("telescope.builtin").treesitter()end,desc = "treesitter picker",},{"<leader>fr",function()require("telescope.builtin").registers()end,desc = "registers picker",},{"<leader>fw",function()local builtin = require("telescope.builtin")local word = vim.fn.expand("<cword>")builtin.grep_string({ search = word })end,desc = "search word",},{"<leader>fW",function()local builtin = require("telescope.builtin")local word = vim.fn.expand("<cWORD>")builtin.grep_string({ search = word })end,desc = "search WORD",},{"<leader>fs",function()local builtin = require("telescope.builtin")builtin.grep_string({ search = vim.fn.input("Grep > ") })end,desc = "search word from input",},},cmd = { "Telescope" },dependencies = { "nvim-lua/plenary.nvim" },opts = {defaults = {layout_config = {prompt_position = "top",preview_width = 0.6,},path_display = { truncate = 4 },sorting_strategy = "ascending",dynamic_preview_title = true,},extensions = {workspaces = {},},},}
return {"uga-rosa/ccc.nvim",cmd = "CccHighlighterToggle",keys = {{"<leader>ccc","<cmd>CccHighlighterToggle<CR>",desc = "Toggle ccc",silent = true,},},opts = {highlighter = {auto_enable = false,lsp = true,},},}
return {-- "matbme/JABS.nvim",-- dependencies = {-- "nvim-tree/nvim-web-devicons",-- },-- cmd = "JABSOpen",-- keys = { { "<leader>fb", ":JABSOpen<CR>" } },-- opts = {-- position = "center",-- border = "single",-- sort_mru = true,-- symbols = {-- current = "C", -- default -- split = "S", -- default -- alternate = "A", -- default -- hidden = "H", -- default -- locked = "L", -- default -- ro = "R", -- default -- edited = "E", -- default -- terminal = "T", -- default -- default_file = "D", -- Filetype icon if not present in nvim-web-devicons. Default -- terminal_symbol = ">_", -- Filetype icon for a terminal split. Default -- },-- keymap = {-- h_split = "s",-- v_split = "v",-- close = "dd",-- },-- },}
vim.g.mapleader = " "-- thanks primeagenMAP("x", "<leader>p", [["_dP]], { desc = "paste over text but keep clipboard" })MAP({ "n", "v" }, "<leader>y", [["+y]], { desc = "yank selection to system clipboard" })MAP("n", "<leader>Y", [["+Y]], { desc = "yank line to system clipboard" })MAP({ "n", "v" }, "<leader>d", '"_d', { desc = "delete without yank" })MAP("n", "J", "mzJ`z", { desc = "better line joins" })MAP("n","<leader>sr",[[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]],{ desc = "instant search and replace current word" })MAP("v", "J", ":m '>+1<CR>gv=gv", { desc = "move line down" })MAP("v", "K", ":m '<-2<CR>gv=gv", { desc = "move line up" })-- Center cursor on various movementsMAP("n", "<C-d>", "<C-d>zz", { desc = "1/2 page down + center cursor" })MAP("n", "<C-u>", "<C-u>zz", { desc = "1/2 page up + center cursor" })MAP("n", "n", "nzz", { desc = "center cursor on next search result" })MAP("n", "N", "Nzz", { desc = "center cursor on previous search result" })-- Start/end of line movementsMAP("n", "H", "^", { desc = "move to first non-blank character of line" })MAP("n", "L", "$", { desc = "move to last character of line" })-- Switch panesMAP("n", "<C-h>", "<C-w>h", { desc = "switch to left pane" })MAP("n", "<C-j>", "<C-w>j", { desc = "switch to below pane" })MAP("n", "<C-k>", "<C-w>k", { desc = "switch to above pane" })MAP("n", "<C-l>", "<C-w>l", { desc = "switch to right pane" })-- Visual mode mappingsMAP("v", "<C-d>", "<C-d>zz", { desc = "1/2 page down + center cursor" })MAP("v", "<C-u>", "<C-u>zz", { desc = "1/2 page up + center cursor" })MAP("v", "n", "nzz", { desc = "center cursor on next search result" })MAP("v", "N", "Nzz", { desc = "center cursor on previous search result" })-- switch buffers-- MAP('n', '<leader>h', ":bprevious<CR>", { desc = "previous buffer" })-- MAP('n', '<leader>l', ":bnext<CR>", { desc = "next buffer" })-- not needed now that I use conform-- MAP('n', '<leader>gg', "gg=G``", {desc = "Indent entire file and return to last edit position"})MAP("n","<leader>tt","<cmd>:vs<cr><cmd>term<cr>",{ desc = "open a terminal in a vertical split" })MAP("n", "<leader>qq", "<cmd>clo<cr>", { desc = "close window" })MAP("n","<leader><esc><esc>","<cmd>silent nohl<cr>",{ desc = "disable search highlight" })
local o = vim.oo.fileformat = "unix"o.fileformats = "unix,dos"o.autochdir = falseo.termguicolors = trueo.mouse = ""o.tabstop = 8o.softtabstop = 8o.shiftwidth = 8o.expandtab = falseo.pumheight = 8o.ignorecase = trueo.smartcase = trueo.smartindent = trueo.smoothscroll = trueo.scrolloff = 8o.sidescrolloff = 10o.signcolumn = "no"o.wrap = falseo.splitright = trueo.splitbelow = trueo.number = trueo.relativenumber = trueo.incsearch = trueo.hlsearch = trueo.showmode = falseo.showtabline = 0o.colorcolumn = "80"o.cursorline = trueo.completeopt = "menuone,noselect"-- Shell configuration handled by systemo.updatetime = 50o.guicursor = ""o.undofile = trueo.swapfile = falseo.backup = falseo.writebackup = falseo.fillchars = "eob:~,fold: ,foldopen:,foldsep: ,foldclose:,vert:▏,lastline:▏"o.conceallevel = 0o.foldcolumn = "0"o.foldenable = falseo.foldlevel = 99o.foldlevelstart = 99o.foldmethod = "indent"--o.foldexpr = 'nvim_treesitter#foldexpr()'--o.foldexpr = 'v:lua.vim.lsp.foldexpr()'
return {-- "andreasvc/vim-256noir",-- priority = 1000,-- lazy = false,-- config = function()-- ColorMyPencils("256_noir")---- -- Custom highlight overrides for 256 noir theme-- local highlights = {-- "hi Normal cterm=NONE ctermfg=250 ctermbg=NONE gui=NONE guifg=#bcbcbc guibg=NONE",-- "hi Keyword cterm=NONE ctermfg=255 ctermbg=NONE gui=NONE guifg=#eeeeee guibg=NONE",-- "hi Constant cterm=NONE ctermfg=252 ctermbg=NONE gui=NONE guifg=#d0d0d0 guibg=NONE",-- "hi String cterm=NONE ctermfg=245 ctermbg=NONE gui=NONE guifg=#8a8a8a guibg=NONE",-- "hi Comment cterm=NONE ctermfg=240 ctermbg=NONE gui=NONE guifg=#585858 guibg=NONE",-- "hi Number cterm=NONE ctermfg=196 ctermbg=NONE gui=NONE guifg=#ff0000 guibg=NONE",-- "hi SignColumn cterm=NONE ctermfg=124 ctermbg=NONE gui=NONE guifg=#af0000 guibg=NONE",-- "hi SpellRare cterm=NONE ctermfg=124 ctermbg=NONE gui=NONE guifg=#af0000 guibg=NONE",-- "hi StatusLine cterm=bold ctermfg=245 ctermbg=233 gui=bold guifg=#8a8a8a guibg=#121212",-- "hi StatusLineNC cterm=NONE ctermfg=236 ctermbg=233 gui=NONE guifg=#303030 guibg=#121212",-- "hi Visual cterm=NONE ctermfg=250 ctermbg=236 gui=NONE guifg=#bcbcbc guibg=#303030",-- "hi Normal cterm=NONE ctermfg=Gray ctermbg=NONE",-- "hi Keyword cterm=NONE ctermfg=White ctermbg=NONE",-- "hi Constant cterm=NONE ctermfg=Gray ctermbg=NONE",-- "hi String cterm=NONE ctermfg=Gray ctermbg=NONE",-- "hi Comment cterm=NONE ctermfg=DarkGray ctermbg=NONE",-- "hi Number cterm=NONE ctermfg=Red ctermbg=NONE",-- "hi SignColumn cterm=NONE ctermfg=Red ctermbg=NONE",-- "hi SpellRare cterm=NONE ctermfg=Red ctermbg=NONE",-- "hi StatusLine cterm=bold ctermfg=Gray ctermbg=Black",-- "hi StatusLineNC cterm=NONE ctermfg=DarkGray ctermbg=Black",-- "hi Visual cterm=NONE ctermfg=Gray ctermbg=DarkGray",-- }---- for _, hl in ipairs(highlights) do-- CMD(hl)-- end---- ColorMyPencils("256_noir")-- DisableItalic()-- DisableBold()-- end,}
return {-- "catppuccin/nvim",-- name = "catppuccin",-- priority = 1000,-- opts = {-- flavour = "mocha", -- latte, frappe, macchiato, mocha-- background = { dark = "mocha" },-- transparent = true,-- term_colors = true,-- dim_inactive = {-- enabled = true,-- shade = "dark",-- percentage = 0.5,-- },-- show_end_of_buffer = true,-- integrations = {-- telescope = { enabled = true },-- mini = { enabled = true, indentscope_color = "lavender" },-- mason = true,-- harpoon = true,-- cmp = true,-- treesitter = true,-- which_key = true,-- gitsigns = true,-- },-- custom_highlights = function(colors)-- return {-- LineNr = { fg = colors.overlay1 },-- }-- end,-- },-- config = function()-- ColorMyPencils("catppuccin")-- end,}
return {-- "aliqyan-21/darkvoid.nvim",-- lazy = false,-- priority = 1000,-- opts = {-- transparent = true,-- glow = false,-- show_end_of_buffer = true,-- colors = {-- plugins = {-- lualine = false,-- },-- },-- },-- config = function()-- ColorMyPencils("darkvoid")-- DisableItalic()-- end,}
return {-- -- blazkowolf is a bit more colourful-- -- "blazkowolf/gruber-darker.nvim",-- "thimc/gruber-darker.nvim",-- lazy = false,-- priority = 1000,-- opts = {-- transparent = true,-- -- Alternative setup options:-- -- bold = true,-- -- italic = {-- -- comments = false,-- -- strings = false,-- -- folds = false,-- -- operators = false,-- -- },-- -- invert = {-- -- visual = false,-- -- },-- -- undercurl = true,-- -- underline = true,-- },-- config = function()-- local function disable_gruber_undercurl()-- local hl_groups = {-- "GruberDarkerRedUnderline",-- "GruberDarkerGreenUnderline",-- "GruberDarkerYellowUnderline",-- "GruberDarkerQuartzUnderline",-- "GruberDarkerNiagaraUnderline",-- "GruberDarkerWisteriaUnderline",-- }-- for _, hl in ipairs(hl_groups) do-- CMD.highlight(hl .. " gui=underline cterm=underline")-- end-- end---- ColorMyPencils("gruber-darker")-- disable_gruber_undercurl()-- DisableItalic()-- end,}
return {-- "ellisonleao/gruvbox.nvim",-- priority = 1000,-- opts = {-- terminal_colors = true,-- dim_inactive = true,-- transparent = true,-- },-- config = function()-- ColorMyPencils("gruvbox")-- end,}
return {-- "jamesukiyo/jimbo.vim",-- lazy = false,-- priority = 1000,-- init = function()-- vim.g.jimbo_transparent = 1-- vim.g.jimbo_bold = 0-- vim.g.jimbo_italic = 0-- end,-- config = function()-- CMD("colorscheme jimbo")-- end,}
return {-- "slugbyte/lackluster.nvim",-- lazy = false,-- priority = 1000,-- opts = {-- disable_plugin = {-- todo_comments = true,-- },-- tweak_ui = {-- disable_undercurl = true,-- enable_end_of_buffer = true,-- },-- tweak_background = {-- normal = "none",-- telescope = "none",-- menu = "none",-- popup = "none",-- },-- tweak_highlight = {-- ["@function"] = {-- bold = true,-- },-- ["@keyword"] = {-- bold = true,-- },-- },-- tweak_syntax = {-- comment = require("lackluster").color.gray5,-- },-- },-- config = function()-- ColorMyPencils("lackluster-mint")-- DisableItalic()-- end,}
return {-- "bluz71/vim-moonfly-colors",-- name = "moonfly",-- lazy = false,-- priority = 1000,-- init = function()-- vim.g.moonflyWinSeparator = 0-- vim.g.moonflyItalics = false-- vim.g.moonflyUndercurls = false-- end,-- config = function()-- ColorMyPencils("moonfly")-- end,}
return {-- "jesseleite/nvim-noirbuddy",-- dependencies = { { "tjdevries/colorbuddy.nvim" } },-- lazy = false,-- priority = 1000,-- opts = {-- preset = "minimal",-- colors = {-- -- primary = "#D5A6A8",-- -- secondary = "#FADADD"-- },-- styles = {-- italic = false,-- bold = true,-- underline = true,-- undercurl = false,-- },-- },-- config = function()-- ColorMyPencils("noirbuddy")-- DisableItalic()-- end,}
return {-- "navarasu/onedark.nvim",-- priority = 1000,-- opts = {-- transparent = true,-- lualine = {-- transparent = true,-- },-- ending_tildes = true,-- term_colors = true,-- },-- config = function()-- -- CMD("colorscheme onedark")-- end,}
return {-- "rose-pine/neovim",-- priority = 1000,-- name = "rose-pine",-- opts = {-- disable_background = true,-- dim_inactive_windows = true,-- styles = { italic = false, transparency = true },-- },-- config = function()-- ColorMyPencils("rose-pine-moon")-- end,}
return {-- "folke/tokyonight.nvim",-- name = "tokyonight",-- priority = 1000,-- opts = {-- dim_inactive = true,-- transparent = true,-- terminal_colors = true,-- styles = {-- sidebars = "dark",-- floats = "dark",-- },-- },-- config = function()-- -- CMD("colorscheme tokyonight")-- -- CMD("colorscheme tokyonight-night")-- -- CMD("colorscheme tokyonight-storm")-- end,}
return {-- "bettervim/yugen.nvim",-- config = function()-- ColorMyPencils("yugen")---- -- Custom highlight overrides-- local highlights = {-- ColorColumn = { bg = "#303030" },-- StatusLine = { bg = "#151515", fg = "#FAFAFA" },-- StatusLineNC = { bg = "#151515", fg = "#FAFAFA" },-- StatusLineTerm = { link = "StatusLine" },-- StatusLineTermNC = { link = "StatusLineNC" },-- }---- for group, opts in pairs(highlights) do-- SET_HL(0, group, opts)-- end-- end,}
return {-- "zenbones-theme/zenbones.nvim",-- lazy = false,-- priority = 1000,-- init = function()-- vim.g.bones_compat = 1-- vim.g.zenbones_transparent_background = 0-- vim.g.zenbones_solid_line_nr = 1-- vim.g.zenbones_italic_comments = 0-- vim.g.zenbones_lighten_line_nr = 10000000000-- vim.g.zenbones_solid_float_border = true-- vim.g.colorize_diagnostic_underline_text = true-- end,-- config = function()-- ColorMyPencils("rosebones")-- DisableItalic()---- -- Custom highlight overrides-- local highlights = {-- DiagnosticUnderlineHint = "gui=underline",-- DiagnosticUnderlineInfo = "gui=underline",-- DiagnosticUnderlineWarn = "gui=underline",-- DiagnosticUnderlineError = "gui=underline",-- ["@markup.link"] = "gui=none",-- }---- for group, opts in pairs(highlights) do-- CMD("hi " .. group .. " " .. opts)-- end-- end,}
let nvim_source_file = $"($env.HOME)/nixos-config/dotfiles/nvim/lua/set_colorscheme.lua"let zellij_config_file = $"($env.HOME)/nixos-config/home/modules/programs/zellij.nix"
let nvim_source_file = $"($env.HOME)/nixos-config/home/modules/programs/nvf/set_colorscheme.lua"let zellij_config_file = $"($env.HOME)/nixos-config/home/modules/programs/zellij.nix"let starship_config_file = $"($env.HOME)/nixos-config/home/modules/shell/starship.nix"
return}# update starship themetry {let content = open $starship_config_filelet updated = $content | str replace --regex 'palette = "\w+_theme";' $'palette = "($new_theme)_theme";'$updated | save $starship_config_file --forceprint $"updated starship source to ($new_theme)_theme"} catch { |e|print $"failed to update starship theme: ($e.msg)"
palettes.light_theme = {username_color = "#2d2d2d";hostname_color = "#1f5f99";directory_color = "#7c3aed";success_color = "#059669";error_color = "#dc2626";branch_color = "#374151";status_highlight = "#b45309";status_color = "#1e40af";state_color = "#6b7280";duration_color = "#dc2626";};palettes.dark_theme = {username_color = "white";hostname_color = "green";directory_color = "blue";success_color = "blue";error_color = "red";branch_color = "cyan";status_highlight = "218";status_color = "cyan";state_color = "bright-black";duration_color = "yellow";};
format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](#b45309) ($ahead_behind$stashed)]($style)";style = "#1e40af";
format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](status_highlight) ($ahead_behind$stashed)]($style)";style = "status_color";
};}{bind = {_args = [ "q" ];GoToTab._args = [ 1 ];};}{bind = {_args = [ "w" ];GoToTab._args = [ 2 ];};}{bind = {_args = [ "e" ];GoToTab._args = [ 3 ];};}{bind = {_args = [ "r" ];GoToTab._args = [ 4 ];};}{bind = {_args = [ "t" ];GoToTab._args = [ 5 ];};}{bind = {_args = [ "y" ];GoToTab._args = [ 6 ];};}{bind = {_args = [ "u" ];GoToTab._args = [ 7 ];};}{bind = {_args = [ "i" ];GoToTab._args = [ 8 ];
return {cmd = { "astro-ls", "--stdio" },filetypes = { "astro" },root_markers = { "package.json", "bun.lock", "tsconfig.json" },settings = {},init_options = {typescript = {tsdk = "node_modules/typescript/lib",},},}
return {cmd = { "bacon-ls" },filetypes = { "rust" },root_markers = { "Cargo.toml", "Cargo.lock", ".bacon-locations" },settings = {init_options = {locationsFile = ".bacon-locations",updateOnSave = true,updateOnSaveWaitMillis = 100,runBaconInBackground = true,synchronizeAllOpenFilesWaitMillis = 1000,},},}
return {capabilities = capabilities,cmd = { "gopls" },root_markers = { "go.mod", "go.sum" },filetypes = { "go" },-- init_options = {-- usePlaceholders = true,-- },settings = {experimentalPostfixCompletions = true,gofumpt = true,staticcheck = true,completeUnimported = true,usePlaceholders = true,semanticTokens = true,-- stylua: ignore startanalyses = { -- all good analyses are enabledshadow = true, QF1005 = true, QF1006 = true, QF1007 = true, QF1011 = true, S1002 = true, S1005 = true, S1006 = true, S1008 = true, S1009 = true, S1011 = true, S1016 = true, S1021 = true, S1029 = true, SA1000 = true, SA1002 = true, SA1003 = true, SA1007 = true, SA1010 = true, SA1011 = true, SA1014 = true, SA1015 = true, SA1017 = true, SA1018 = true, SA1020 = true, SA1021 = true, SA1023 = true, SA1024 = true, SA1025 = true, SA1026 = true, SA1027 = true, SA1028 = true, SA1030 = true, SA1031 = true, SA1032 = true, SA2002 = true, SA2003 = true, SA4005 = true, SA4006 = true, SA4008 = true, SA4009 = true, SA4010 = true, SA4012 = true, SA4015 = true, SA4017 = true, SA4018 = true, SA4023 = true, SA4031 = true, SA5000 = true, SA5002 = true, SA5005 = true, SA5007 = true, SA5010 = true, SA5011 = true, SA5012 = true, SA6000 = true, SA6001 = true, SA6002 = true, SA6003 = true, SA9001 = true, SA9003 = true, SA9005 = true, SA9007 = true, SA9008 = true,},-- stylua: ignore endcodelenses = {run_govulncheck = true,},vulncheck = "Imports",},}
return {cmd = { "lua-language-server" },filetypes = { "lua" },settings = {Lua = {diagnostics = {globals = { "vim" },},workspace = {checkThirdParty = true,library = vim.api.nvim_get_runtime_file("", true),},},},}
return {cmd = { "rust-analyzer" },filetypes = { "rust" },root_markers = { "Cargo.toml", "Cargo.lock" },settings = {["rust-analyzer"] = {assist = {preferSelf = true,},lens = {references = {adt = {enable = true,},enumVariant = {enable = true,},method = {enable = true,},trait = {enable = true,all = true,},},},semanticHighlighting = {operator = {specialization = {enable = true,},},punctuation = {enable = true,separate = {macro = {enable = true,},},specialization = {enable = true,},},},inlayHints = {bindingModeHints = {enable = true,},closureCaptureHints = {enable = true,},closureReturnTypeHints = {enable = true,},discriminantHints = {enable = true,},expressionAdjustmentHints = {enable = true,},genericParameterHints = {lifetime = {enable = true,},type = {enable = true,},},implicitDrops = {enable = true,},implicitSizedBoundHints = {enable = true,},lifetimeElisionHints = {useParameterNames = true,enable = true,},rangeExclusiveHints = {enable = true,},},-- checkOnSave and diagnostics must be disabled for bacon-lscheckOnSave = {command = "clippy",enable = true,},diagnostics = {enable = true,experimental = {enable = true,},styleLints = {enable = true,},},hover = {actions = {references = {enable = true,},},show = {enumVariants = 10,fields = 10,traitAssocItems = 10,},},interpret = {tests = true,},cargo = {features = "all",},completion = {hideDeprecated = true,fullFunctionSignatures = {enable = true,},},},},}
return {cmd = { "bunx", "--bun", "typescript-language-server", "--stdio" },root_markers = { "package.json", "bun.lock", "package-lock.json" },init_options = {plugins = {{name = "@vue/typescript-plugin",location = vim.fn.exepath("vue-language-server"),languages = { "vue" },},},},filetypes = {"typescript","javascript","javascriptreact","typescriptreact","vue",},}
return {filetypes = { "yaml" },settings = {yaml = {schemaStore = {-- You must disable built-in schemaStore support if you want to use-- this plugin and its advanced options like `ignore`.enable = false,-- Avoid TypeError: Cannot read properties of undefined (reading 'length')url = "",},schemas = require("schemastore").yaml.schemas(),},},}
local function file_info()local fe = vim.o.fileencodinglocal ff = vim.o.fileformatif fe == "" or ff == "" thenreturn ""elseif fe ~= "utf-8" and ff ~= "unix" thenreturn fe .. " :: " .. ff .. " :: "elseif fe ~= "utf-8" and ff == "unix" thenreturn fe .. " :: "elseif fe == "utf-8" and ff ~= "unix" thenreturn ff .. " :: "elsereturn ""endendlocal function lualine_custom_no_icons()local fe = vim.o.fileencodinglocal ff = vim.o.fileformatlocal ft = vim.o.filetypeif fe == "" or ff == "" or ft == "" thenreturn ""elseif fe ~= "utf-8" and ff ~= "unix" thenreturn fe .. " :: " .. ff .. " :: " .. ftelseif fe ~= "utf-8" and ff == "unix" thenreturn fe .. " :: " .. ftelseif fe == "utf-8" and ff ~= "unix" thenreturn ff .. " :: " .. ftelsereturn ftendendlocal function pomo_timer()local ok, pomo = pcall(require, "pomo")if not ok then return "" endlocal timer = pomo.get_first_to_finish()if timer == nil then return "" endreturn " " .. tostring(timer)endlocal filename = { "filename", show_filename_only = false, path = 1 }local diagnostics = {"diagnostics",symbols = {error = "",warn = "",info = "",hint = "",},}return {"nvim-lualine/lualine.nvim",lazy = false,priority = 900,dependencies = { "nvim-tree/nvim-web-devicons" },opts = {options = {theme = "auto",disabled_filetypes = { "no-neck-pain" },section_separators = "",component_separators = "",icons_enabled = true,},-- extensions = { "lazy", "mason", "toggleterm", "quickfix", "fugitive", "lazy", "trouble" },sections = {lualine_a = { "mode" },lualine_b = { "branch", diagnostics },lualine_c = { filename, "diff" },lualine_x = { pomo_timer },lualine_y = { file_info, "filetype" },lualine_z = { "location" },},inactive_sections = {lualine_a = { "mode" },lualine_b = { "branch", diagnostics },lualine_c = { filename, "diff" },lualine_x = { pomo_timer },lualine_y = { file_info, "filetype" },lualine_z = { "location" },},},}
extraPlugins = {"vimplugin-rusticated" = {package = pkgs.vimUtils.buildVimPlugin {name = "rusticated";src = pkgs.fetchFromGitHub {owner = "haystackandroid";repo = "rusticated";rev = "8052162f2c602725b4c0faf1d003404d5b9140c2";sha256 = "sha256-PF5rUyEMi05HsimfrfqpXNY6RAEBHctpBoJh733jogE=";};};};"vimplugin-rasmus.nvim" = {package = pkgs.vimUtils.buildVimPlugin {name = "rasmus.nvim";src = pkgs.fetchFromGitHub {owner = "kvrohit";repo = "rasmus.nvim";rev = "49f7ee7bf3eb00db52c77f84b15bc69f318bafc1";sha256 = "sha256-MWc6zzMGZ6OceZGbx2qmuHe9FvIUXK1rtb+yIsfRokY=";};};};};
assistant = {supermaven-nvim = {enable = true;
globals = {vimwiki_option_diary_path = "./diary/";vimwiki_global_ext = 0;vimwiki_option_nested_syntaxes = {svelte = "svelte";typescript = "ts";};vimwiki_list = [{path = "~/vimwiki/james/";syntax = "markdown";ext = ".md";}{path = "~/vimwiki/healgorithms/";syntax = "markdown";ext = ".md";}];assistant = {supermaven-nvim = {enable = true;setupOpts = {keymaps = {accept_suggestion = "<TAB>";};};};
autocomplete = {blink-cmp = {enable = true;setupOpts = {keymap = {preset = "enter";};completion = {documentation = {auto_show = true;auto_show_delay_ms = 250;};# menu = {# draw = {# columns = {# { "kind" };# { "label", gap = 1 };# };# };# };};cmdline = {enabled = false;};signature = {enabled = true;};sources = {default = ["lsp""path""snippets""buffer"];providers = {buffer = {opts = {# get_bufnrs = function()# return vim.tbl_filter(function(bufnr)# return vim.bo[bufnr].buftype == ""# end, vim.api.nvim_list_bufs())# end,};};};};};};};
# autocomplete = {# blink-cmp = {# enable = false;# setupOpts = {# keymap = {# preset = "enter";# };# completion = {# list = {# selection = {# preselect = false;# };# };# documentation = {# auto_show = true;# auto_show_delay_ms = 250;# };# menu = {# draw = {# columns = lib.generators.mkLuaInline ''# {# { "kind" },# { "label", gap = 1 }# }# '';# };# };# };# cmdline = {# enabled = false;# };# signature = {# enabled = true;# };# sources = {# default = [# "lsp"# "path"# "snippets"# "buffer"# ];# providers = {# buffer = {# opts = lib.generators.mkLuaInline ''# {# get_bufnrs = function()# return vim.tbl_filter(function(bufnr)# return vim.bo[bufnr].buftype == ""# end, vim.api.nvim_list_bufs())# end,# }# '';# };# };# };# };# };# };
# statusline# statusline = {# enable = false; # disabled initially# lualine.enable = true;# };
lazy.plugins = {# TODO: FIX LUALINE"lualine.nvim" = {package = pkgs.vimPlugins.lualine-nvim;enabled = true;lazy = true;priority = 1000;setupOpts = lib.generators.mkLuaInline ''{options = {theme = "auto",disabled_filetypes = { "no-neck-pain" },section_separators = "",component_separators = "",icons_enabled = true,},sections = {lualine_a = { "mode" },lualine_b = { "branch", LualineDiagnostics },lualine_c = { LualineFilename, "diff" },lualine_x = { LualinePomoTimer },lualine_y = { LualineFileInfo, "filetype" },lualine_z = { "location" },},inactive_sections = {lualine_a = { "mode" },lualine_b = { "branch", LualineDiagnostics },lualine_c = { LualineFilename, "diff" },lualine_x = { LualinePomoTimer },lualine_y = { LualineFileInfo, "filetype" },lualine_z = { "location" },}}'';};
"vimplugin-tiny-inline-diagnostic.nvim" = {package = pkgs.vimUtils.buildVimPlugin {name = "tiny-inline-diagnostic.nvim";src = pkgs.fetchFromGitHub {owner = "rachartier";repo = "tiny-inline-diagnostic.nvim";rev = "7dcf8542059fb15c978de845fc8665428ae13a04";sha256 = "sha256-BGmGYYNweelepgFQ58X2PhafAHNyb0N+nNqncHU0Kbc=";};};event = [ "BufReadPost" ];
"tiny-inline-diagnostic.nvim" = {package = pkgs.vimPlugins.tiny-inline-diagnostic-nvim;
"vimplugin-package-info.nvim" = {package = pkgs.vimUtils.buildVimPlugin {name = "package-info.nvim";src = pkgs.fetchFromGitHub {owner = "vuki656";repo = "package-info.nvim";rev = "4f1b8287dde221153ec9f2acd46e8237d2d0881e";sha256 = "sha256-vrRcWSPfWTDs0r7LvqJVMIPFSZTlLJQG1/dU5or6xLs=";};doCheck = false;};event = [ "BufRead package.json" ];
"package-info.nvim" = {package = pkgs.vimPlugins.package-info-nvim;lazy = true;
"vimplugin-ts-context-commentstring.nvim" = {package = pkgs.vimUtils.buildVimPlugin {name = "ts-context-commentstring.nvim";src = pkgs.fetchFromGitHub {owner = "JoosepAlviste";repo = "nvim-ts-context-commentstring";rev = "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f";sha256 = "sha256-AjDM3+n4+lNBQi8P2Yrh0Ab06uYCndBQT9TX36rDbOM=";};};event = [ "BufRead" ];setupModule = "ts_context_commentstring";setupOpts = { };
"ts-comments.nvim" = {package = pkgs.vimPlugins.ts-comments-nvim;lazy = true;
"vimplugin-vimwiki" = {package = pkgs.vimUtils.buildVimPlugin {name = "vimwiki";src = pkgs.fetchFromGitHub {owner = "vimwiki";repo = "vimwiki";rev = "72792615e739d0eb54a9c8f7e0a46a6e2407c9e8";sha256 = "sha256-O85nZUWxIKm0gFILAkWH9WqfVcEbnbxR56grqMmum3A=";};};
"vimwiki" = {package = pkgs.vimPlugins.vimwiki;lazy = true;
beforeAll = ''vim.g.vimwiki_option_diary_path = "./diary/"vim.g.vimwiki_global_ext = 0vim.g.vimwiki_option_nested_syntaxes = { svelte = "svelte", typescript = "ts" }vim.g.vimwiki_list = {{ path = "~/vimwiki/james/", syntax = "markdown", ext = ".md" },{ path = "~/vimwiki/healgorithms/", syntax = "markdown", ext = ".md" }}'';
"vimplugin-zen-mode.nvim" = {package = pkgs.vimUtils.buildVimPlugin {name = "zen-mode.nvim";src = pkgs.fetchFromGitHub {owner = "folke";repo = "zen-mode.nvim";rev = "main";sha256 = "sha256-TofQ1o5+LH3/1aoLr90oLbBaXFFtu62SXifH5oyj2/k=";};};
"zen-mode.nvim" = {package = pkgs.vimPlugins.zen-mode-nvim;
"vimplugin-twilight.nvim" = {package = pkgs.vimUtils.buildVimPlugin {name = "twilight.nvim";src = pkgs.fetchFromGitHub {owner = "folke";repo = "twilight.nvim";rev = "main";sha256 = "sha256-sC9DSgkQw+jHvi+xUP+iWSSLV0kIWWmrom2Mq5q+RJo=";};};
"twilight.nvim" = {package = pkgs.vimPlugins.twilight-nvim;
"vimplugin-typr" = {package = pkgs.vimUtils.buildVimPlugin {name = "typr";src = pkgs.fetchFromGitHub {owner = "nvzone";repo = "typr";rev = "main";sha256 = "sha256-ULjrPOYaWCk8G5B37p+aYD0jI2vngc0LxQIxQduaEWo=";};doCheck = false;};
"nvzone-typr" = {package = pkgs.vimPlugins.nvzone-typr;
"vimplugin-baleia.nvim" = {package = pkgs.vimUtils.buildVimPlugin {name = "baleia.nvim";src = pkgs.fetchFromGitHub {owner = "m00qek";repo = "baleia.nvim";rev = "v1.3.0";sha256 = "sha256-8wG9Oh5Ff7XXOjZ3rPvThCF5QYOyCXxiIcJjgT89RDU=";};};
"baleia.nvim" = {package = pkgs.vimPlugins.baleia-nvim;lazy = true;};"nvzone-volt" = {package = pkgs.vimPlugins.nvzone-volt;
"vimplugin-volt" = {package = pkgs.vimUtils.buildVimPlugin {name = "volt";src = pkgs.fetchFromGitHub {owner = "nvzone";repo = "volt";rev = "main";sha256 = "sha256-szq/QBI2Y6DKeqBuJ8qA4LlGYnarLT6D/fvwepIgSVc=";
"blink.cmp" = {package = pkgs.vimPlugins.blink-cmp;lazy = false;setupModule = "blink-cmp";setupOpts = {keymap = {preset = "enter";};completion = {list = {selection = {preselect = false;};};documentation = {auto_show = true;auto_show_delay_ms = 250;};menu = {draw = {columns = lib.generators.mkLuaInline ''{{ "kind" },{ "label", gap = 1 }}'';};};};cmdline = {enabled = false;
signature = {enabled = true;};sources = {default = ["lsp""path""snippets""buffer"];providers = {buffer = {opts = lib.generators.mkLuaInline ''{get_bufnrs = function()return vim.tbl_filter(function(bufnr)return vim.bo[bufnr].buftype == ""end, vim.api.nvim_list_bufs())end,}'';};};};
# missing from builtin telescope{key = "<leader>ft";mode = "n";action = "<cmd>Telescope treesitter<CR>";desc = "Telescope treesitter";}{key = "<leader>fw";mode = "n";action = "<cmd>lua require('telescope.builtin').grep_string({ search = vim.fn.expand('<cword>') })<CR>";desc = "Telescope word";}{key = "<leader>fW";mode = "n";action = "<cmd>lua require('telescope.builtin').grep_string({ search = vim.fn.expand('<cWORD>') })<CR>";desc = "Telescope WORD";}{key = "<leader>fs";mode = "n";action = "<cmd>lua require('telescope.builtin').grep_string({ search = vim.fn.input('Grep > ') })<CR>";desc = "Telescope search for input word";}{key = "<leader>fc";mode = "n";action = "<cmd>lua require('telescope.builtin').resume()<CR>";desc = "Telescope resume last picker";}# missing from builtin undotree{key = "<leader>u";mode = "n";action = "<cmd>UndotreeToggle<CR>";desc = "Toggle undotree";}
}{event = [ "LspAttach" ];callback = mkLuaInline ''function(args)local client = vim.lsp.get_client_by_id(args.data.client_id)vim.keymap.set("n", "<leader>ih", function()if vim.lsp.inlay_hint.is_enabled() thenvim.lsp.inlay_hint.enable(false)elsevim.lsp.inlay_hint.enable(true)endend)if client:supports_method("textDocument/foldingRange") thenvim.wo.foldmethod = "expr"vim.wo.foldexpr = "v:lua.vim.lsp.foldexpr()"elsevim.wo.foldmethod = "indent"endvim.keymap.set("n", "gd", function()vim.lsp.buf.definition()end, { desc = "Go to definition" })vim.keymap.set("n", "gr", function()vim.lsp.buf.references()end, { desc = "Show references" })vim.keymap.set("n", "grn", function()vim.lsp.buf.rename()end, { desc = "vim.lsp rename" })vim.keymap.set("n", "gi", function()vim.lsp.buf.implementation()end, { desc = "vim.lsp implementation" })vim.keymap.set({ "n", "v" }, "ga", function()vim.lsp.buf.code_action()end, { desc = "vim.lsp code action" })vim.keymap.set("n", "K", function()vim.lsp.buf.hover()end, { desc = "Hover" })end'';
html = {enable = true;# treesitter.autoTagHtml = true;
};};globals = {rustaceanvim = {tools = {test_executor = "background";};server = {default_settings = lib.generators.mkLuaInline ''{["rust-analyzer"] = {assist = {preferSelf = true,},lens = {references = {adt = {enable = true,},enumVariant = {enable = true,},method = {enable = true,},trait = {enable = true,all = true,},},},inlayHints = {bindingModeHints = {enable = true,},closureCaptureHints = {enable = true,},closureReturnTypeHints = {enable = true,},discriminantHints = {enable = true,},expressionAdjustmentHints = {enable = true,},genericParameterHints = {lifetime = {enable = true,},type = {enable = true,},},implicitDrops = {enable = true,},implicitSizedBoundHints = {enable = true,},lifetimeElisionHints = {useParameterNames = true,enable = true,},rangeExclusiveHints = {enable = true,},},-- checkOnSave and diagnostics must be disabled for bacon-lscheckOnSave = {command = "clippy",enable = false,},diagnostics = {enable = false,experimental = {enable = true,},styleLints = {enable = true,},},hover = {actions = {references = {enable = true,},},},interpret = {tests = true,},cargo = {features = "all",},completion = {hideDeprecated = true,fullFunctionSignatures = {enable = true,},},},}'';};dap = { };
# commented ones don't have builtinsastro.enable = true;# bacon-ls.enable = true;go.enable = true;# json.enable = true;lua.enable = true;nix.enable = true;nu.enable = true;rust.enable = true;svelte.enable = true;tailwind.enable = true;ts.enable = true;yaml.enable = true;
lsp.servers = {"*" = {root_markers = [ ".git" ];capabilities = lib.generators.mkLuaInline ''vim.tbl_deep_extend("force",{},vim.lsp.protocol.make_client_capabilities(),require("blink.cmp").get_lsp_capabilities())'';};"astro" = {cmd = ["astro-ls""--stdio"];filetypes = [ "astro" ];root_markers = ["package.json""bun.lock""tsconfig.json"];init_options = {typescript = {tsdk = "node_modules/typescript/lib";};};};bacon-ls = {root_markers = ["Cargo.toml""Cargo.lock"".bacon-locations"];filetypes = [ "rust" ];cmd = [ "bacon-ls" ];settings = {init_options = {locationsFile = ".bacon-locations";updateOnSave = true;updateOnSaveWaitMillis = 100;runBaconInBackground = true;synchronizeAllOpenFilesWaitMillis = 1000;};};};gopls = {root_markers = ["go.mod""go.sum"];filetypes = [ "go" ];cmd = [ "gopls" ];settings = {experimentalPostfixCompletions = true;gofumpt = true;staticcheck = true;completeUnimported = true;usePlaceholders = true;semanticTokens = true;codelenses = {run_govulncheck = true;};vulncheck = "Imports";};};json_ls = {filetypes = ["json""jsonc"];settings = {json = {schema = lib.generators.mkLuaInline ''require("schemastore").json.schemas()'';validate = {enable = true;};};};};lua_ls = {filetypes = [ "lua" ];cmd = [ "lua-language-server" ];settings = {Lua = {diagnostics = {globals = ["vim""wezterm"];};workspaces = {checkThirdParty = true;library = lib.generators.mkLuaInline ''vim.api.nvim_get_runtime_file("", true)'';};};};};"nixd" = {root_markers = ["flake.nix"".git"];filetypes = [ "nix" ];cmd = [ "nixd" ];};nushell = {filetypes = [ "nu" ];cmd = ["nu""--lsp"];};
# now handled by rustaceanvim# "rust_analyzer" = {# root_markers = [# "Cargo.toml"# "Cargo.lock"# ];# filetypes = [ "rust" ];# cmd = [ "rust-analyzer" ];# settings = {};# };"svelteserver" = {root_markers = ["package.json""bun.lock"];filetypes = [ "svelte" ];cmd = ["svelteserver""--stdio"];};"tailwindcss" = {root_markers = ["package.json""bun.lock"];filetypes = ["astro""svelte""tsx""jsx""html""vue"];cmd = ["tailwindcss-language-server""--stdio"];};"ts_ls" = {root_markers = ["package.json""bun.lock""package-lock.json"];filetypes = ["typescript""javascript""javascriptreact""typescriptreact""vue"];cmd = ["bunx""--bun""typescript-language-server""--stdio"];init_options = {plugins = lib.generators.mkLuaInline ''{{name = "@vue/typescript-plugin",location = vim.fn.exepath("vue-language-server"),languages = { "vue" },}}'';};};"yamlls" = {filetypes = [ "yaml" ];settings = {yaml = {schemaStore = {# You must disable built-in schemaStore support if you want to use# this plugin and its advanced options like `ignore`.enable = false;# Avoid TypeError: Cannot read properties of undefined (reading 'length')url = "";};schemas = lib.generators.mkLuaInline ''require("schemastore").yaml.schemas()'';};};};
AUTOCMD("LspAttach", {callback = function(args)vim.diagnostic.config({update_in_insert = false,virtual_text = false,float = {focusable = false,border = "rounded",source = "always",header = "",prefix = "",},})local client = lsp.get_client_by_id(args.data.client_id)MAP("n", "<leader>ih", function()if vim.lsp.inlay_hint.is_enabled() thenvim.lsp.inlay_hint.enable(false)elsevim.lsp.inlay_hint.enable(true)endend)if client:supports_method("textDocument/foldingRange") thenvim.wo.foldmethod = "expr"vim.wo.foldexpr = "v:lua.vim.lsp.foldexpr()"elsevim.wo.foldmethod = "indent"endMAP("n", "gd", function()lsp.buf.definition()end, { desc = "Go to definition" })MAP("n", "gr", function()lsp.buf.references()end, { desc = "Show references" })MAP("n", "grn", function()lsp.buf.rename()end, { desc = "vim.lsp rename" })MAP("n", "gi", function()lsp.buf.implementation()end, { desc = "vim.lsp implementation" })MAP({ "n", "v" }, "ga", function()lsp.buf.code_action()end, { desc = "vim.lsp code action" })MAP("n", "K", function()lsp.buf.hover()end, { desc = "Hover" })end,})
{programs.nvf.settings.vim.highlight = {TreeSitterContextLineNumberBottom = {fg = "#FFFFFF";};TreeSitterContextSeparator = {fg = "#363636";};};}
endendfunction LualineFileInfo()local fe = vim.o.fileencodinglocal ff = vim.o.fileformatif fe == "" or ff == "" thenreturn ""elseif fe ~= "utf-8" and ff ~= "unix" thenreturn fe .. " :: " .. ff .. " :: "elseif fe ~= "utf-8" and ff == "unix" thenreturn fe .. " :: "elseif fe == "utf-8" and ff ~= "unix" thenreturn ff .. " :: "elsereturn ""
function LualinePomoTimer()local ok, pomo = pcall(require, "pomo")if not ok then return "" endlocal timer = pomo.get_first_to_finish()if timer == nil then return "" endreturn " " .. tostring(timer)endLualineDiagnostics = {"diagnostics",symbols = {error = "",warn = "",info = "",hint = "",},}LualineFilename = {"filename",show_filename_only = false,path = 1}
SET_HL(0, "Normal", { bg = "none" })SET_HL(0, "NormalFloat", { bg = "none" })SET_HL(0, "NormalNC", { bg = "none" })
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })vim.api.nvim_set_hl(0, "NormalNC", { bg = "none" })
SET_HL(0, "LineNrAbove", { fg = "#BFBFBF", bold = false })SET_HL(0, "LineNr", { fg = "white", bold = true })SET_HL(0, "LineNrBelow", { fg = "#BFBFBF", bold = false })
vim.api.nvim_set_hl(0, "LineNrAbove", { fg = "#BFBFBF", bold = false })vim.api.nvim_set_hl(0, "LineNr", { fg = "white", bold = true })vim.api.nvim_set_hl(0, "LineNrBelow", { fg = "#BFBFBF", bold = false })
{programs.bacon = {enable = true;settings = {jobs.bacon-ls = {command = ["cargo""clippy""--workspace""--all-targets""--all-features""--message-format""json-diagnostic-rendered-ansi"];analyzer = "cargo_json";need_stdout = true;};exports.cargo-json-spans = {auto = true;exporter = "analyzer";line_format = ''{diagnostic.level}|:|{span.file_name}|:|{span.line_start}|:|{span.line_end}|:|{span.column_start}|:|{span.column_end}|:|{diagnostic.message}|:|{diagnostic.rendered}|:|{span.suggested_replacement}'';path = ".bacon-locations";};};};}
home.file."install-cargo-extras.sh" = {text = ''#!/usr/bin/env bash# script to install additional cargo packages not available in nixpkgsecho "Installing additional cargo packages with cargo-binstall..."cargo binstall -y \cargo-machete \bacon-ls \dioxus-cli \sleek \cargo-workspaces \cargo-fuzz \cargo-carefulecho "Additional cargo packages installed"'';executable = true;};
"bacon-ls": {"inputs": {"flake-utils": "flake-utils","naersk": "naersk","nixpkgs": ["nixpkgs"]},"locked": {"lastModified": 1752047895,"narHash": "sha256-z74U4nMaEcQdSZG4nwZxTM1UIOdosy+6p7rFvTKIk+8=","owner": "crisidev","repo": "bacon-ls","rev": "6160fdfa0bb61e43522f2c7918ea3e553f4e113b","type": "github"},"original": {"owner": "crisidev","repo": "bacon-ls","type": "github"}},
"flake-utils": {"inputs": {"systems": "systems"},"locked": {"lastModified": 1731533236,"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=","owner": "numtide","repo": "flake-utils","rev": "11707dc2f618dd54ca8739b309ec4fc024de578b","type": "github"},"original": {"owner": "numtide","repo": "flake-utils","type": "github"}},
"lastModified": 1745377448,"narHash": "sha256-jhZDfXVKdD7TSEGgzFJQvEEZ2K65UMiqW5YJ2aIqxMA=","owner": "NixOS","repo": "nixpkgs","rev": "507b63021ada5fee621b6ca371c4fca9ca46f52c","type": "github"},"original": {"owner": "NixOS","ref": "nixpkgs-unstable","repo": "nixpkgs","type": "github"}},"nixpkgs_2": {"locked": {
"locked": {"lastModified": 1681028828,"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=","owner": "nix-systems","repo": "default","rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e","type": "github"},"original": {"owner": "nix-systems","repo": "default","type": "github"}},"systems_2": {