diff --git a/README.md b/README.md index 5410ad4..557858f 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ## Running ### With Nix (Recommended) - +nix run "." ### On any system @@ -18,3 +18,16 @@ Install neovim config (backup old version first if present): git clone https://github.com/RingOfStorms/nvim ~/.config/nvim nvim --headless "+Lazy! sync" +qa ``` + + + +## NOTES/TODOS + + +- Checkout cargo-bloat, cargo-cache, cargo-outdated - memcache sccache +- For scratches, just make an input box for custom extension rather than predefined list +- for find files, ignore git, capital F for find all + +- plugins to check out: + - https://github.com/declancm/cinnamon.nvim + - https://github.com/folke/noice.nvim diff --git a/flake.nix b/flake.nix index 9234847..305efed 100644 --- a/flake.nix +++ b/flake.nix @@ -4,10 +4,8 @@ inputs = { nixpkgs.url = "nixpkgs/nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; - # inputs.nixpkgs.follows = "nixpkgs"; - # All my neovim plguins managed by flake. Lazy will only be used for loading/configuration with direct dir links to these. "nvim_plugin-folke/lazy.nvim" = { url = "github:folke/lazy.nvim"; flake = false; @@ -25,6 +23,7 @@ pkgs = nixpkgs.legacyPackages.${system}; lib = nixpkgs.lib; + # This will look at all inputs and grab any prefixed with `nvim_plugin-` nvimPluginPaths = "NVIM_PLUGIN_PATHS=" + lib.generators.toLua { multiline = false; @@ -42,10 +41,17 @@ (builtins.attrNames inputs)) ) ; + nvimConfigStorePath = ''NVIM_CONFIG_STORE_PATH="${./.}"''; runtimeDependencies = with pkgs; [ + ripgrep + curl cowsay + nodePackages.cspell ]; + + treesitterParsers = builtins.attrValues pkgs.vimPlugins.nvim-treesitter.grammarPlugins; + # https://zimbatm.com/notes/1000-instances-of-nixpkgs # Read article for why we don't do the below version # pkgs = import nixpkgs { @@ -69,31 +75,75 @@ { packages = { default = self.packages.${system}.neovim; - neovim = pkgs.wrapNeovimUnstable pkgs.neovim-unwrapped ( - pkgs.neovimUtils.makeNeovimConfig - { - customRC = '' - lua print("HELLO WORLD 123! TEST") - lua ${nvimPluginPaths} - lua package.path =";${./.}/lua/?.lua" .. package.path - luafile ${./.}/init.lua - ''; - # set runtimepath^=${builtins.concatStringsSep "," treesitterParsers} - } - // { - wrapperArgs = [ - # Add runtime dependencies to neovim path - "--prefix" - "PATH" - ":" - "${lib.makeBinPath runtimeDependencies}" - # Use custom XDG_CONFIG_HOME so it doesn't use the user's real one - "--set" - "XDG_CONFIG_HOME" - "~/.config/ringofstorms_neovim" - ]; - } - ); + neovim = + (pkgs.wrapNeovimUnstable + pkgs.neovim-unwrapped + (pkgs.neovimUtils.makeNeovimConfig + { + withPython3 = false; + customRC = '' + lua ${nvimPluginPaths} + lua ${nvimConfigStorePath} + luafile ${./.}/init.lua + set runtimepath^=${builtins.concatStringsSep "," treesitterParsers} + ''; + # lua package.path = package.path .. ";${./.}/lua/?.lua" + # lua print("HELLO WORLD 123! TEST") + # lua print("${./.}") + # -- lua package.runtimepath = "${./.}` + # plugins = [ + # pkgs.vimPlugins.nvim-treesitter.withAllGrammars + # ]; + # customRC = import ./lua { inherit lib self; }; + # wrapperArgs = [ + # # Add runtime dependencies to neovim path + # "--prefix" + # "PATH" + # ":" + # "${lib.makeBinPath runtimeDependencies}" + # # Set the LAZY env path to the nix store + # "--set" + # "LAZY" + # "${inputs.nvim_plugin-folke/lazy.nvim}" + # # Use custom XDG_CONFIG_HOME so it doesn't use the user's real one + # # TODO do I need to set all the XDG_ env vars? - or should I remove this entirely? + # "--set" + # "XDG_CONFIG_HOME" + # "${./.}" + # ]; + } + + ) + ).overrideAttrs + (old: { + generatedWrapperArgs = old.generatedWrapperArgs or [ ] ++ [ + # Add runtime dependencies to neovim path + "--prefix" + "PATH" + ":" + "${lib.makeBinPath runtimeDependencies}" + # Set the LAZY env path to the nix store + "--set" + "LAZY" + "${inputs."nvim_plugin-folke/lazy.nvim"}" + # Use custom XDG_CONFIG_HOME so it doesn't use the user's real one + # TODO do I need to set all the XDG_ env vars? - or should I remove this entirely? + "--set" + "XDG_CONFIG_HOME" + "~/.config/nvim_flaked" + "--set" + "XDG_DATA_HOME" + "~/.local/share/nvim_flaked" + "--set" + "XDG_RUNTIME_DIR" + "/tmp/nvim.user/nvim_flaked/xxx" + "--set" + "XDG_STATE_HOME" + "~/.local/state/nvim_flaked" + ]; + }) + + ; # neovim = pkgs.stdenv.mkDerivation { # name = "nvim"; # nativeBuildInputs = with pkgs; [ makeWrapper rsync ]; diff --git a/init.lua b/init.lua index 81224ca..f0114c4 100644 --- a/init.lua +++ b/init.lua @@ -1,4 +1,68 @@ -NVIM_PLUGIN_PATHS = NVIM_PLUGIN_PATHS or {} - +if NVIM_CONFIG_STORE_PATH then + -- Function to add subdirectories to package.path + local function add_lua_subdirs_to_path(base_dir) + local scan_dir + scan_dir = function(dir) + package.path = package.path .. ";" .. dir .. "?.lua" + package.path = package.path .. ";" .. dir .. "?/init.lua" + local paths = vim.fn.globpath(dir, '*/', 0, 1) + for _, subdir in ipairs(paths) do + scan_dir(subdir) -- Recursively add subdirectories + end + end + scan_dir(base_dir) + end + -- Call the function with the base directory of your Lua modules + add_lua_subdirs_to_path(NVIM_CONFIG_STORE_PATH .. "/lua/") +end require("options") +require("keymaps") + +print("NIX FLAKE NVIM: nvim packages " .. vim.inspect(NVIM_PLUGIN_PATHS)) + +-- When using nix, it will set lazy via LAZY env variable. +local lazypath = vim.env.LAZY or (vim.fn.stdpath("data") .. "/lazy/lazy.nvim") +if not vim.loop.fs_stat(lazypath) then + if vim.env.LAZY then + error("LAZY environment variable provided but it does not exist at path: " .. vim.env.LAZY) + return + end + -- For non nix systems, pull lazy stable to the normal XDG config path + local output = vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) + if vim.api.nvim_get_vvar("shell_error") ~= 0 then + error("Error cloning lazy.nvim repository...\n\n" .. output) + end +end +vim.opt.rtp:prepend(lazypath) + +print("TEST") +local asd = require("catppuccin") +print("TEST2 " .. vim.inspect(asd)) + +-- Setup lazy +require("lazy").setup({ + spec = { + { import = "plugins" }, + }, + change_detection = { + enabled = false, + }, + defaults = { + -- lazy = true + }, + -- install = { + -- colorscheme = { "catppuccin" }, + -- } +}) + +-- vim.cmd("colorscheme catppuccin") +require("tools") +require("autocommands") diff --git a/lua/autocommands.lua b/lua/autocommands.lua index e69de29..49bc9e9 100644 --- a/lua/autocommands.lua +++ b/lua/autocommands.lua @@ -0,0 +1,70 @@ +--function isEmpty() +--return vim.api.nvim_buf_get_name(0) == "" +--or vim.fn.filereadable(vim.api.nvim_buf_get_name(0)) == 0 +--or vim.fn.line("$") == 1 and vim.fn.col("$") == 1 +--end + +--vim.api.nvim_create_autocmd({ "VimEnter" }, { +-- callback = function() +-- if isEmpty() then +-- require('telescope.builtin').find_files() +-- end +-- end +--}) + +vim.api.nvim_create_autocmd("BufRead", { + pattern = ".env*", + command = "set filetype=sh", +}) + +vim.api.nvim_create_autocmd("BufRead", { + pattern = ".*rc", + command = "set filetype=sh", +}) + +vim.api.nvim_create_autocmd("BufRead", { + pattern = "Dockerfile.*", + command = "set filetype=dockerfile", +}) + +if vim.fn.exists(":CccHighlighterEnable") ~= 0 then + vim.api.nvim_create_autocmd("BufRead", { + callback = function() + vim.cmd.CccHighlighterEnable() + end, + }) +end + +-- AUto exit insert mode whenever we switch screens +vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, { + callback = function() + if vim.bo.filetype ~= "TelescopePrompt" and vim.bo.filetype ~= nil and vim.bo.filetype ~= "" then + vim.api.nvim_command("stopinsert") + end + end, +}) + +vim.api.nvim_create_autocmd({ "BufEnter" }, { + pattern = "*.http", + command = "set filetype=http", +}) + +--vim.api.nvim_create_autocmd('BufEnter', { +-- callback = function () +-- local ts_avail, parsers = pcall(require, "nvim-treesitter.parsers") +-- if ts_avail and parsers.has_parser() then vim.cmd.TSBufEnable "highlight" end +-- end, +--}) + +vim.api.nvim_create_autocmd("VimLeavePre", { + callback = function() + vim.cmd("NvimTreeClose") + -- Close all buffers with the 'httpResult' type + local buffers = vim.api.nvim_list_bufs() + for _, bufnr in ipairs(buffers) do + if vim.bo[bufnr].filetype == "httpResult" then + vim.api.nvim_buf_delete(bufnr, { force = true }) + end + end + end, +}) diff --git a/lua/keymaps.lua b/lua/keymaps.lua index e69de29..b88c22a 100644 --- a/lua/keymaps.lua +++ b/lua/keymaps.lua @@ -0,0 +1,177 @@ +-- Remap space as leader key +vim.keymap.set("", "", "", { silent = true }) +vim.g.mapleader = " " +vim.g.maplocalleader = " " + +-- Modes test +-- normal_mode = "n", +-- insert_mode = "i", +-- visual_mode = "v", +-- visual_block_mode = "x", +-- term_mode = "t", +-- command_mode = "c", + +local nvx = { "n", "v", "x" } + +require("util").keymaps({ + -- ============= + -- n/v/x (normal + visual modes) + -- ============= + { ";", ":", desc = "No shift to enter command mode with semicolon. Alias ; to :", mode = nvx }, + { "a", "ggVG", desc = "Select all", mode = nvx }, + { "w", "w", desc = "Save", mode = nvx }, + { + "q", + function() + -- Use to have this which always closed and quit ont he last screen: "confirm q" + -- Instead I want this behavior: + -- if only 1 screen is open then close all buffers, resulting in a blank unnamed buffer window similar to fresh session + -- else if more than 1 screen, confirm q to close that screen + -- Check the number of screens + if vim.fn.winnr("$") == 1 then + -- If only 1 screen is open then close all buffers, resulting in a blank unnamed buffer window similar to fresh session + vim.cmd("bufdo bd") + vim.cmd("SessionDelete") + else + -- If more than 1 screen, confirm q to close that screen + vim.cmd("confirm q") + end + end, + desc = "Quit", + mode = nvx, + }, + { "Q", "qa", desc = "Quit all", mode = nvx }, + -- { "Q", "qa", desc = "Quit all", mode = nvx }, + { "Q", "", mode = nvx }, -- don't do normal Q quit + { + "QQ", + "NvimTreeCloseSessionDeleteqa", + desc = "Quit all, no session saved", + mode = nvx, + }, + { "y", '"+y', desc = "Copy to system clipboard", mode = nvx }, + { "p", '"+p', desc = "Paste from system clipboard", mode = nvx }, + { "bq", "bp|bd #", desc = "Close current buffer only", mode = nvx }, + { "bn", "enew", desc = "Open a new buffer in current screen", mode = nvx }, + { "bt", "terminali", desc = "Open a terminal in current screen", mode = nvx }, + { "tn", "tabnew", desc = "Create new tab", mode = nvx }, + { "tq", "tabclose", desc = "Close current tab", mode = nvx }, + + { + "S", + "set equalalwaysset noequalalways", + desc = "Equalize/resize screens evenly", + mode = nvx, + }, + { "", "h", desc = "Move window left current", mode = nvx }, + { "", "j", desc = "Move window below current", mode = nvx }, + { "", "k", desc = "Move window above current", mode = nvx }, + { "", "l", desc = "Move window right current", mode = nvx }, + { "B", "b#", desc = "Switch to last buffer", mode = nvx }, + { + "l", + function() + -- vim.cmd "SqlxFormat" + vim.lsp.buf.format() + end, + desc = "Reformat file", + mode = nvx, + }, + { + "ls", + "SqlxFormat", + desc = "Format sqlx queries in rust raw string literals.", + mode = nvx, + }, + { + "ld", + function() + vim.diagnostic.open_float() + end, + desc = "Show diagnostic message", + mode = nvx, + }, + { + "ll", + function() + vim.diagnostic.setloclist() + end, + desc = "Show diagnostic list", + mode = nvx, + }, + + -- ============= + -- normal mode + -- ============= + -- { "", "", desc = "" }, + { "H", "tabprevious", desc = "Move to previous tab" }, + { "L", "tabnext", desc = "Move to next tab" }, + { "|", "vsplit", desc = "Vertical Split" }, + { "\\", "split", desc = "Horizontal Split" }, + { "n", "nzzzv", desc = "Next search result centered" }, + { "N", "Nzzzv", desc = "Previous search result centered" }, + { "", ":noh", desc = "Clear search on escape" }, + { "", ":noh", desc = "Clear search on return" }, + { "", "zz", desc = "Vertical half page down and center cursor" }, + { "", "zz", desc = "Vertical half page up and center cursor" }, + { "J", "mzJ`z", desc = "Move line below onto this line" }, + { "", "", desc = "Go back " }, + { + "]d", + function() + vim.diagnostic.goto_next() + end, + desc = "Go to next diagnostic", + }, + { + "[d", + function() + vim.diagnostic.goto_prev() + end, + desc = "Go to next diagnostic", + }, + + -- ============= + -- VISUAL + -- ============= + { + "J", + ":m '>+1gv=gv", + desc = "Visually move block down", + mode = "v", + }, + { + "K", + ":m '<-2gv=gv", + desc = "Visually move block up", + mode = "v", + }, + { + ",uu", + 'd:let @u = trim(tolower(system("uuidgen")))iu', + desc = "Generate and replace UUID", + mode = "v", + }, + { "p", '"_dP', desc = "Paste without yanking replaced content", mode = "v" }, + { "", '"hy:%s/h//g', desc = "Replace current selection", mode = "v" }, + { ">", "> gv", desc = "Indent selection", mode = "v" }, + { "<", "< gv", desc = "Outdent selection", mode = "v" }, + + -- ============= + -- insert / command + -- ============= + { "", "", desc = "Up", mode = { "i", "c" } }, + { "", "", desc = "Down", mode = { "i", "c" } }, + { "", "", desc = "Left", mode = { "i", "c" } }, + { "", "", desc = "Right", mode = { "i", "c" } }, + { "", "", desc = "End", mode = { "i", "c" } }, + { "", "", desc = "Home", mode = { "i", "c" } }, + -- ============= + -- command + -- ============= + -- { mode = "c" } + -- ============= + -- terminal + -- ============= + { "", "", desc = "Escape the terminal", mode = "t" }, +}) diff --git a/lua/options.lua b/lua/options.lua index 6f44a42..567d4e9 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -1,3 +1,6 @@ +-- allow use of system keyboard +-- vim.opt.clipboard = "unnamedplus" + -- global status line vim.opt.laststatus = 3 @@ -56,19 +59,3 @@ vim.opt.diffopt:append("linematch:20") -- enable colors for opacity changes vim.o.termguicolors = true - -function dump(o) - if type(o) == 'table' then - local s = '{ ' - for k,v in pairs(o) do - if type(k) ~= 'number' then k = '"'..k..'"' end - s = s .. '['..k..'] = ' .. dump(v) .. ',' - end - return s .. '} ' - else - return tostring(o) - end -end - - -print("NIX FLAKE NVIM: nvim package count " .. dump(NVIM_PLUGIN_PATHS)) diff --git a/lua/plugins/catppuccin.lua b/lua/plugins/catppuccin.lua new file mode 100644 index 0000000..1132c95 --- /dev/null +++ b/lua/plugins/catppuccin.lua @@ -0,0 +1,27 @@ +return { + "catppuccin/nvim", + dir = NVIM_PLUGIN_PATHS["nvim_plugin-catppuccin/nvim"] or nil, + opts = { + flavour = "mocha", -- latte, frappe, macchiato, mocha (default) + color_overrides = { + mocha = { + -- My coal variant: https://gist.github.com/RingOfStorms/b2ff0c4e37f5be9f985c72c3ec9a3e62 + text = "#e0e0e0", + subtext1 = "#cccccc", + subtext0 = "#b8b8b8", + overlay2 = "#a3a3a3", + overlay1 = "#8c8c8c", + overlay0 = "#787878", + surface2 = "#636363", + surface1 = "#4f4f4f", + surface0 = "#3b3b3b", + base = "#262626", + mantle = "#1f1f1f", + crust = "#171717", + }, + }, + }, + config = function(_, opts) + require("catppuccin").setup(opts) + end, +} diff --git a/lua/tools/init.lua b/lua/tools/init.lua new file mode 100644 index 0000000..6dcfd62 --- /dev/null +++ b/lua/tools/init.lua @@ -0,0 +1,13 @@ +-- Require all files in this tools dir, minus this init.lua file +function script_path() + return debug.getinfo(2, "S").source:sub(2):match("(.*/)") +end +-- Extract the directory name from the script path +local directory_name = script_path():match(".*/(.*)/") +for _, file in ipairs(vim.fn.readdir(script_path(), [[v:val =~ '\.lua$']])) do + if file ~= "init.lua" then + local neighbor = string.sub(file, 0, -5) + require(directory_name .. "." .. neighbor) + end +end + diff --git a/lua/tools/quick-fix.lua b/lua/tools/quick-fix.lua new file mode 100644 index 0000000..3f29271 --- /dev/null +++ b/lua/tools/quick-fix.lua @@ -0,0 +1,20 @@ +-- Function to remove item from quickfix list +function RemoveQFItem() + local curqfidx = vim.fn.line(".") - 1 + local qfall = vim.fn.getqflist() + table.remove(qfall, curqfidx + 1) -- Lua is 1-indexed + vim.fn.setqflist(qfall, "r") + vim.cmd(curqfidx .. "cfirst") + vim.cmd("copen") +end + +-- Command to call the function +vim.api.nvim_create_user_command("RemoveQFItem", RemoveQFItem, {}) + +-- Auto command to map 'dd' in quickfix window +vim.api.nvim_create_autocmd("FileType", { + pattern = "qf", + callback = function() + vim.keymap.set("n", "dd", RemoveQFItem, { buffer = true, silent = true }) + end, +}) diff --git a/lua/util.lua b/lua/util.lua new file mode 100644 index 0000000..4034a37 --- /dev/null +++ b/lua/util.lua @@ -0,0 +1,112 @@ +local M = {} + +function M.cmd_executable(cmd, callback) + local executable = vim.fn.executable(cmd) == 1 + -- Check if a callback is provided and it is a function + if executable and callback and type(callback) == "function" then + callback() + end + + -- Check if a callback is provided and it is a table + if type(callback) == "table" then + if executable and (callback[1] or callback[true]) then + -- Call the function associated with key 1 or true if the command is executable + local func = callback[1] or callback[true] + if type(func) == "function" then + func() + end + elseif not executable and (callback[2] or callback[false]) then + -- Call the function associated with key 2 or false if the command is not executable + local func = callback[2] or callback[false] + if type(func) == "function" then + func() + end + end + end + + return executable +end + +-- [1]: (string) lhs (required) +-- [2]: (string|fun()) rhs (optional) +-- mode: (string|string[]) mode (optional, defaults to "n") +-- ft: (string|string[]) filetype for buffer-local keymaps (optional) +-- any other option valid for vim.keymap.set +function M.keymaps(keymaps) + -- is not an array, will pass directly to keymaps + if type(keymaps[1]) == "string" then + M.keymap(keymaps) + else + -- is array will iterate over + for _, keymap in pairs(keymaps) do + M.keymap(keymap) + end + end +end + +function M.keymap(keymap) + local lhs = keymap[1] + local rhs = keymap[2] + local mode = keymap["mode"] or "n" + local opts = {} + for key, value in pairs(keymap) do + if type(key) ~= "number" and key ~= "mode" then + opts[key] = value + end + end + + local status, err = pcall(function() + vim.keymap.set(mode, lhs, rhs, opts) + end) + if not status then + vim.notify("Failed to create keymap: " .. err, 3) + end +end + +function M.spread(template) + local result = {} + for key, value in pairs(template) do + result[key] = value + end + + return function(table) + for key, value in pairs(table) do + result[key] = value + end + return result + end +end + +function M.table_contains(table, element) + for _, value in pairs(table) do + if value == element then + return true + end + end + return false +end + +-- From https://github.com/lukas-reineke/onedark.nvim/blob/master/lua/onedark.lua +function M.highlight(group, options) + local guifg = options.fg or "NONE" + local guibg = options.bg or "NONE" + local guisp = options.sp or "NONE" + local gui = options.gui or "NONE" + local blend = options.blend or 0 + local ctermfg = options.ctermfg or "NONE" + + vim.cmd( + string.format( + "highlight %s guifg=%s ctermfg=%s guibg=%s guisp=%s gui=%s blend=%d", + group, + guifg, + ctermfg, + guibg, + guisp, + gui, + blend + ) + ) +end + +return M diff --git a/lua/utils.lua b/lua/utils.lua deleted file mode 100644 index e69de29..0000000 diff --git a/test.nix b/test.nix new file mode 100644 index 0000000..a9da2f6 --- /dev/null +++ b/test.nix @@ -0,0 +1,134 @@ +{ + outputs = + { self + , nixpkgs + , neovim-src + , ... + }: + let + inherit (nixpkgs) lib; + # + # Funni helper function + # + withSystem = + f: + lib.fold lib.recursiveUpdate { } ( + map f [ + "x86_64-linux" + "x86_64-darwin" + "aarch64-linux" + "aarch64-darwin" + ] + ); + in + withSystem ( + system: + let + pkgs = nixpkgs.legacyPackages.${system}; + in + { + # + # Linter and formatter, run with "nix fmt" + # You can use alejandra or nixpkgs-fmt instead of nixfmt if you wish + # + formatter.${system} = pkgs.writeShellApplication { + name = "lint"; + runtimeInputs = [ + pkgs.nixfmt-rfc-style + pkgs.deadnix + pkgs.statix + pkgs.fd + pkgs.stylua + ]; + text = '' + fd '.*\.nix' . -x statix fix -- {} \; + fd '.*\.nix' . -X deadnix -e -- {} \; -X nixfmt {} \; + fd '.*\.lua' . -X stylua --indent-type Spaces --indent-width 2 {} \; + ''; + }; + + packages.${system} = { + default = self.packages.${system}.neovim; + + neovim = + (pkgs.wrapNeovimUnstable + (pkgs.neovim-unwrapped.overrideAttrs { + # + # Use neovim nightly + # + src = neovim-src; + version = neovim-src.shortRev or "dirty"; + patches = [ ]; + preConfigure = '' + sed -i cmake.config/versiondef.h.in -e "s/@NVIM_VERSION_PRERELEASE@/-dev-$version/" + ''; + }) + ( + pkgs.neovimUtils.makeNeovimConfig { + plugins = + [ + # + # Add plugins from nixpkgs here + # + pkgs.vimPlugins.nvim-treesitter.withAllGrammars + ] + ++ lib.mapAttrsToList + ( + # + # This generates plugins from npins sources + # + name: src: (pkgs.vimUtils.buildVimPlugin { inherit name src; }) + ) + (import ./npins/sources.nix pkgs); + # + # Use the string generated in ./lua/default.nix for init.vim + # + customRC = import ./lua { inherit lib self; }; + } + ) + ).overrideAttrs + (old: { + generatedWrapperArgs = old.generatedWrapperArgs or [ ] ++ [ + "--prefix" + "PATH" + ":" + (lib.makeBinPath [ + # + # Runtime dependencies + # + pkgs.deadnix + pkgs.statix + pkgs.nil + pkgs.ripgrep + pkgs.fd + pkgs.lua-language-server + pkgs.stylua + ]) + ]; + }); + }; + } + ); + inputs = { + nixpkgs = { + type = "github"; + owner = "NixOS"; + repo = "nixpkgs"; + ref = "nixos-unstable"; + }; + neovim-src = { + type = "github"; + owner = "neovim"; + repo = "neovim"; + ref = "f694d020c576fb037eb92bae3bbf03a69d8686b6"; + flake = false; + }; + flake-compat = { + type = "github"; + owner = "edolstra"; + repo = "flake-compat"; + flake = false; + }; + }; +} + diff --git a/~/.local/state/nvim_flaked/nvim/log b/~/.local/state/nvim_flaked/nvim/log new file mode 100644 index 0000000..f92106a --- /dev/null +++ b/~/.local/state/nvim_flaked/nvim/log @@ -0,0 +1,6 @@ +WRN 2024-04-30T01:39:24.865 ?.1519525 server_start:164: Failed to start server: no such file or directory: /tmp/nvim.user/nvim_flaked/xxx/ +WRN 2024-04-30T10:45:55.120 ?.1604443 server_start:164: Failed to start server: no such file or directory: /tmp/nvim.user/nvim_flaked/xxx/ +WRN 2024-04-30T10:51:56.393 ?.1611908 server_start:164: Failed to start server: no such file or directory: /tmp/nvim.user/nvim_flaked/xxx/ +WRN 2024-04-30T10:54:55.143 ?.1619079 server_start:164: Failed to start server: no such file or directory: /tmp/nvim.user/nvim_flaked/xxx/ +WRN 2024-04-30T10:55:21.678 ?.1619181 server_start:164: Failed to start server: no such file or directory: /tmp/nvim.user/nvim_flaked/xxx/ +WRN 2024-04-30T10:55:38.457 ?.1625034 server_start:164: Failed to start server: no such file or directory: /tmp/nvim.user/nvim_flaked/xxx/