diff --git a/flake.nix b/flake.nix index 4de34df..62fcfca 100644 --- a/flake.nix +++ b/flake.nix @@ -19,25 +19,29 @@ }; }; - outputs = inputs@{ self, nixpkgs, home-manager, nix-darwin, nixos-hardware, nixvim, ... }: { + outputs = inputs @ { + nixpkgs, + nix-darwin, + ... + }: { nixosConfigurations = { desktop = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - specialArgs = { inherit inputs; }; + specialArgs = {inherit inputs;}; modules = [ ./hosts/desktop/configuration.nix ]; }; thinkpad = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - specialArgs = { inherit inputs; }; + specialArgs = {inherit inputs;}; modules = [ ./hosts/thinkpad/configuration.nix ]; }; dell = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - specialArgs = { inherit inputs; }; + specialArgs = {inherit inputs;}; modules = [ ./hosts/dell/configuration.nix ]; @@ -46,7 +50,7 @@ darwinConfigurations = { macbook = nix-darwin.lib.darwinSystem { - specialArgs = { inherit inputs; }; + specialArgs = {inherit inputs;}; modules = [ ./hosts/macbook/configuration.nix ]; diff --git a/hosts/dell/configuration.nix b/hosts/dell/configuration.nix index f912e26..ef3da7f 100644 --- a/hosts/dell/configuration.nix +++ b/hosts/dell/configuration.nix @@ -30,7 +30,6 @@ nix.settings.experimental-features = [ "nix-command" "flakes" ]; environment.systemPackages = with pkgs; [ - neovim wget git curl diff --git a/hosts/dell/home.nix b/hosts/dell/home.nix index f680931..0715106 100644 --- a/hosts/dell/home.nix +++ b/hosts/dell/home.nix @@ -5,7 +5,7 @@ ../../modules/home-manager/i3 ../../modules/home-manager/ssh ../../modules/home-manager/git - ../../modules/home-manager/neovim + ../../modules/home-manager/nixvim ../../modules/home-manager/wezterm ../../modules/home-manager/zsh ../../modules/home-manager/tmux diff --git a/hosts/desktop/configuration.nix b/hosts/desktop/configuration.nix index 3095a07..e257fbd 100644 --- a/hosts/desktop/configuration.nix +++ b/hosts/desktop/configuration.nix @@ -33,7 +33,6 @@ nix.settings.experimental-features = [ "nix-command" "flakes" ]; environment.systemPackages = with pkgs; [ - neovim wget git curl diff --git a/hosts/desktop/home.nix b/hosts/desktop/home.nix index bd7d1b6..5c7150d 100644 --- a/hosts/desktop/home.nix +++ b/hosts/desktop/home.nix @@ -5,7 +5,7 @@ ../../modules/home-manager/i3 ../../modules/home-manager/ssh ../../modules/home-manager/git - ../../modules/home-manager/neovim + ../../modules/home-manager/nixvim ../../modules/home-manager/wezterm ../../modules/home-manager/zsh ../../modules/home-manager/tmux diff --git a/hosts/macbook/configuration.nix b/hosts/macbook/configuration.nix index ab260f8..72a8f59 100644 --- a/hosts/macbook/configuration.nix +++ b/hosts/macbook/configuration.nix @@ -54,8 +54,6 @@ }; }; - # programs.zsh.enable = true; - system.stateVersion = 5; # Auto upgrade nix package and the daemon service. diff --git a/hosts/macbook/home.nix b/hosts/macbook/home.nix index 225bc23..8a74ed8 100644 --- a/hosts/macbook/home.nix +++ b/hosts/macbook/home.nix @@ -19,17 +19,15 @@ home.sessionVariables = { EDITOR = "nvim"; + ZK_NOTEBOOK_DIR = "\${HOME}/zk"; }; programs = { direnv = { enable = true; - enableZshIntegration = true; # see note on other shells below + enableZshIntegration = true; nix-direnv.enable = true; }; - java = { - enable = true; - }; zk = { enable = true; settings = { @@ -38,10 +36,9 @@ }; }; }; - }; - - home.sessionVariables = { - ZK_NOTEBOOK_DIR = "\${HOME}/zk"; + go = { + enable = true; + }; }; home.packages = with pkgs; [ @@ -67,7 +64,6 @@ glow gcc nchat - go emanote ]; diff --git a/hosts/thinkpad/configuration.nix b/hosts/thinkpad/configuration.nix index 1c53e02..a4cf97f 100644 --- a/hosts/thinkpad/configuration.nix +++ b/hosts/thinkpad/configuration.nix @@ -35,7 +35,6 @@ nix.settings.experimental-features = [ "nix-command" "flakes" ]; environment.systemPackages = with pkgs; [ - neovim wget git curl diff --git a/hosts/thinkpad/home.nix b/hosts/thinkpad/home.nix index a4a12da..9314831 100644 --- a/hosts/thinkpad/home.nix +++ b/hosts/thinkpad/home.nix @@ -5,7 +5,7 @@ ../../modules/home-manager/i3 ../../modules/home-manager/ssh ../../modules/home-manager/git - ../../modules/home-manager/neovim + ../../modules/home-manager/nixvim ../../modules/home-manager/wezterm ../../modules/home-manager/zsh ../../modules/home-manager/tmux diff --git a/modules/home-manager/email/default.nix b/modules/home-manager/email/default.nix index 76cf232..52619cd 100644 --- a/modules/home-manager/email/default.nix +++ b/modules/home-manager/email/default.nix @@ -149,10 +149,6 @@ addresses = [ "michael@michaelthomson.dev" ]; collections = [ "default" ]; }; - khard = { - enable = true; - defaultCollection = "default"; - }; }; }; }; diff --git a/modules/home-manager/neovim/default.nix b/modules/home-manager/neovim/default.nix deleted file mode 100644 index 7164e00..0000000 --- a/modules/home-manager/neovim/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ inputs, pkgs, config, ... }: - -{ - home.packages = with pkgs; [ - fzf - ripgrep - luarocks - luajit - lua-language-server - nil - ]; - - programs.neovim = { - enable = true; - package = inputs.neovim-nightly-overlay.packages.${pkgs.system}.default; - }; - - home.file.".config/nvim/" = { - source = ./nvim; - recursive = true; - }; - -} diff --git a/modules/home-manager/neovim/nvim/README.md b/modules/home-manager/neovim/nvim/README.md deleted file mode 100644 index bfbc84d..0000000 --- a/modules/home-manager/neovim/nvim/README.md +++ /dev/null @@ -1,76 +0,0 @@ -# My Neovim Config - - - - -![Screenshot 2023-10-19 at 2 16 29 PM](https://github.com/michaelthomson0797/nvim/assets/8810940/170440a7-aadb-4e88-b45e-02e7737a3d28) - - -- [My Neovim Config](#my-neovim-config) - - [Prerequisites](#prerequisites) - - [Installation](#installation) - - [Plugins used](#plugins-used) - - [Basic Keybinds](#basic-keybinds) - - [Project Navigation](#project-navigation) - - [File Navigation](#file-navigation) - - [LSP Commands](#lsp-commands) - - -An okay config - -## Prerequisites -- `neovim` -- `git` -- `fzf` -- `ripgrep` - -## Installation -Clone this folder, or copy all the contents to `~/.config/nvim/` - -## Plugins used -- `lazy.nvim`: Package manager that manages installed plugins -- `lsp-zero`: Basic configurations for providing language server support like autocompletion, intellisense, diagnostics, etc. -- `alpha-nvim`: Splash screen when starting neovim -- `fidget.nvim`: LSP status indicator -- `gitsigns.nvim`: File change indicators in the buffer gutter -- `harpoon`: Project-specific file bookmarking and rapid navigation -- `leap.nvim`: Fast file navigation by jumping to characters in the buffer -- `lspsaga.nvim`: UI replacement for many LSP function (rename, documentation hover, etc.) -- `lualine.nvim`: Status with nice styling -- `mini.nvim`: A collection of utilities - - `mini.comment`: Apply language sensitive comments - - `mini.pairs`: automatically pair parens, quotes, etc. - - `mini.surround`: Quickly add, edit, delete surroundings (parens, quotes, etc.) - - `mini.splitjoin`: quickly split or join a list - - `mini.jump`: enhanced f/F/t/T movement -- `neo-tree.nvim`: File tree explorer and editor -- `noice.nvim`: Fancy UI replacements -- `nvim-ts-autotag`: Automatic pairing of HTML tags in `.html`, `.jsx`, `.tsx` -- `telescope.nvim`: Fuzzy file and text finder -- `toggleterm.nvim`: Quickly toggle integrated terminal on and off -- `nvim-treesitter`: Syntax tree parsing -- `trouble.nvim`: Diagnostics listing -- `undotree`: Show file undo/redo history as a tree and traverse it - -## Basic Keybinds -### Project Navigation -- `fe`: open file explorer -- `ff`: fuzzy find files in project -- `fg`: fuzzy find text in project -- `fg`: fuzzy find text in project - -### File Navigation -- `s{c1}{c2}`: searches the active buffer for the two provided characters and provides prompts to press to instantly navigate to that pair - -### LSP Commands -- `gd`: Go to definition -- `gr`: Go to references -- `rn`: Rename symbol -- `ca`: Code actions -- `ds`: Fuzzy find document symbols -- `ws`: Fuzzy find workspace symbols -- `[d`/`]d`: Jump to next/prev diagnostic -- `K`: Show symbol documentation -- `o`: show outline - - diff --git a/modules/home-manager/neovim/nvim/init.lua b/modules/home-manager/neovim/nvim/init.lua deleted file mode 100644 index f8d4d0c..0000000 --- a/modules/home-manager/neovim/nvim/init.lua +++ /dev/null @@ -1,71 +0,0 @@ -local opt = vim.opt - --- Bootstrap lazy.nvim -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end -end -vim.opt.rtp:prepend(lazypath) - -vim.api.nvim_set_keymap("", "", "", { noremap = true, silent = true }) -vim.g.mapleader = " " -vim.g.maplocalleader = " " - --- Setup lazy.nvim -require("lazy").setup({ - spec = { - { import = "plugins" }, - }, - install = { colorscheme = { "habamax" } }, - checker = { enabled = true }, -}) - --- Load core settings -opt.hlsearch = false -- turn off highlight on search -opt.relativenumber = true --Make relative number default -opt.updatetime = 50 --Decrease update time -opt.clipboard = 'unnamedplus' -- Access system clipboard -opt.laststatus = 3 -- Global status line -opt.swapfile = false -vim.opt_local.conceallevel = 2 -vim.opt.inccommand = 'split' - -vim.opt.conceallevel = 2; - --- Time in milliseconds to wait for a mapped sequence to complete. -opt.timeoutlen = 300 - -opt.scrolloff = 10 -- Lines of context -opt.expandtab = true -opt.smarttab = true -opt.textwidth = 0 -opt.autoindent = true -opt.shiftwidth = 2 -opt.tabstop = 2 -opt.softtabstop = 2 -opt.guifont = "Iosevka Nerd Font Mono" - -vim.keymap.set("n", "", "zz") -vim.keymap.set("n", "", "zz") -vim.keymap.set("n", "n", "nzzzv") -vim.keymap.set("n", "N", "Nzzzv") - -vim.keymap.set("x", "p", [["_dP]]) -vim.keymap.set({"n", "v"}, "y", [["+y]]) -vim.keymap.set("n", "Y", [["+Y]]) -vim.keymap.set({"n", "v"}, "d", [["_d]]) - -vim.keymap.set("n", "Q", "") -vim.keymap.set("n", "", "") - -vim.keymap.set("i", "jk", "") diff --git a/modules/home-manager/neovim/nvim/lua/.luarc.json b/modules/home-manager/neovim/nvim/lua/.luarc.json deleted file mode 100644 index 1e1765c..0000000 --- a/modules/home-manager/neovim/nvim/lua/.luarc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "diagnostics.globals": [ - "vim" - ] -} \ No newline at end of file diff --git a/modules/home-manager/neovim/nvim/lua/plugins/activate.lua b/modules/home-manager/neovim/nvim/lua/plugins/activate.lua deleted file mode 100644 index fb09770..0000000 --- a/modules/home-manager/neovim/nvim/lua/plugins/activate.lua +++ /dev/null @@ -1,6 +0,0 @@ -return { - 'zSnails/NeoNeedsKey', - config = function () - require("NeoNeedsKey").setup() - end -} diff --git a/modules/home-manager/neovim/nvim/lua/plugins/harpoon.lua b/modules/home-manager/neovim/nvim/lua/plugins/harpoon.lua deleted file mode 100644 index b765f9f..0000000 --- a/modules/home-manager/neovim/nvim/lua/plugins/harpoon.lua +++ /dev/null @@ -1,9 +0,0 @@ -return { - 'theprimeagen/harpoon', - keys = { - { "a", function() require('harpoon.mark').add_file() end }, - { "e", function() require('harpoon.ui').toggle_quick_menu() end }, - { "k", function() require('harpoon.ui').nav_next() end }, - { "j", function() require('harpoon.ui').nav_prev() end }, - } -} diff --git a/modules/home-manager/neovim/nvim/lua/plugins/kanagawa.lua b/modules/home-manager/neovim/nvim/lua/plugins/kanagawa.lua deleted file mode 100644 index a38c4b2..0000000 --- a/modules/home-manager/neovim/nvim/lua/plugins/kanagawa.lua +++ /dev/null @@ -1,6 +0,0 @@ -return { - "rebelot/kanagawa.nvim", - config = function () - vim.cmd.colorscheme "kanagawa" - end -} diff --git a/modules/home-manager/neovim/nvim/lua/plugins/lsp.lua b/modules/home-manager/neovim/nvim/lua/plugins/lsp.lua deleted file mode 100644 index 9e7d6f7..0000000 --- a/modules/home-manager/neovim/nvim/lua/plugins/lsp.lua +++ /dev/null @@ -1,191 +0,0 @@ -return { - { - 'folke/lazydev.nvim', - ft = 'lua', - opts = { - library = { - { path = 'luvit-meta/library', words = { 'vim%.uv' } }, - }, - }, - }, - { 'Bilal2453/luvit-meta', lazy = true }, - { - 'neovim/nvim-lspconfig', - cmd = 'LspInfo', - event = {'BufReadPre', 'BufNewFile'}, - config = function() - vim.api.nvim_create_autocmd('LspAttach', { - group = vim.api.nvim_create_augroup('lsp-attach', { clear = true }), - callback = function(event) - local map = function(keys, func, desc, mode) - mode = mode or 'n' - vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = "LSP: " .. desc }) - end - - map("gd", function() vim.lsp.buf.definition() end, 'goto defintion') - map("gr", function() vim.lsp.buf.references() end, 'goto references') - map("K", function() vim.lsp.buf.hover() end, 'hover') - map("ws", function() vim.lsp.buf.workspace_symbol() end, 'workspace symbols') - map("d", function() vim.diagnostic.open_float() end, 'diagnostic float') - map("[d", function() vim.diagnostic.jump({ count = 1, float = true }) end, 'next diagnostic') - map("]d", function() vim.diagnostic.jump({ count = -1, float = true }) end, 'prev diagnostic') - map("ca", function() vim.lsp.buf.code_action() end, 'code actions') - map("rn", function() vim.lsp.buf.rename() end, 'rename') - map("", function() vim.lsp.buf.signature_help() end, 'signature help', "i") - end - }) - - local capabilities = vim.lsp.protocol.make_client_capabilities() - capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_capabilities()) - - -- Server configs - local lsp = require('lspconfig') - - -- vue - lsp.volar.setup({ - capabilities = capabilities, - }) - - -- typescript / javascript - require'lspconfig'.ts_ls.setup{ - capabilities = capabilities, - init_options = { - plugins = { - { - name = "@vue/typescript-plugin", - location = "", - languages = {"javascript", "typescript", "vue"}, - }, - }, - }, - filetypes = { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx", "vue" } - } - - -- eslint - lsp.eslint.setup({ - capabilities = capabilities, - }) - - -- tailwind - lsp.tailwindcss.setup({ - capabilities = capabilities, - root_dir = lsp.util.root_pattern('tailwind.config.js', 'tailwind.config.cjs', 'tailwind.config.mjs', 'tailwind.config.ts') - }) - - -- html - lsp.html.setup({ - capabilities = capabilities, - }) - - -- go - lsp.gopls.setup({ - capabilities = capabilities, - }) - lsp.golangci_lint_ls.setup({ - capabilities = capabilities, - }) - - -- templ - vim.filetype.add({ extension = { templ = "templ" } }) - lsp.templ.setup({ - capabilities = capabilities, - }) - - lsp.lua_ls.setup({ - capabilities = capabilities, - }) - - lsp.nil_ls.setup({ - capabilities = capabilities, - }) - - lsp.ccls.setup({ - capabilities = capabilities, - }) - lsp.astro.setup({ - capabilities = capabilities, - }) - lsp.cssls.setup({ - capabilities = capabilities, - }) - lsp.jdtls.setup({ - capabilities = capabilities, - }) - end, - }, - { - 'hrsh7th/nvim-cmp', - event = 'InsertEnter', - dependencies = { - { - 'L3MON4D3/LuaSnip', - build = (function() - -- Build Step is needed for regex support in snippets. - -- This step is not supported in many windows environments. - -- Remove the below condition to re-enable on windows. - if vim.fn.has 'win32' == 1 or vim.fn.executable 'make' == 0 then - return - end - return 'make install_jsregexp' - end)(), - dependencies = { - { - 'rafamadriz/friendly-snippets', - config = function() - require('luasnip.loaders.from_vscode').lazy_load() - end, - }, - }, - }, - 'saadparwaiz1/cmp_luasnip', - 'hrsh7th/cmp-nvim-lsp', - 'hrsh7th/cmp-path', - }, - config = function() - -- See `:help cmp` - local cmp = require 'cmp' - local luasnip = require 'luasnip' - luasnip.config.setup {} - - cmp.setup { - snippet = { - expand = function(args) - luasnip.lsp_expand(args.body) - end, - }, - completion = { completeopt = 'menu,menuone,noinsert' }, - mapping = cmp.mapping.preset.insert { - [''] = cmp.mapping.select_next_item(), - [''] = cmp.mapping.select_prev_item(), - [''] = cmp.mapping.scroll_docs(-4), - [''] = cmp.mapping.scroll_docs(4), - [''] = cmp.mapping.confirm { select = true }, - [''] = cmp.mapping.complete {}, - [''] = cmp.mapping(function() - if luasnip.expand_or_locally_jumpable() then - luasnip.expand_or_jump() - end - end, { 'i', 's' }), - [''] = cmp.mapping(function() - if luasnip.locally_jumpable(-1) then - luasnip.jump(-1) - end - end, { 'i', 's' }), - }, - sources = { - { - name = 'lazydev', - -- set group index to 0 to skip loading LuaLS completions as lazydev recommends it - group_index = 0, - }, - { name = 'nvim_lsp' }, - { name = 'luasnip' }, - { name = 'path' }, - }, - } - end, - }, - { - 'nvim-tree/nvim-web-devicons', - } -} diff --git a/modules/home-manager/neovim/nvim/lua/plugins/mini.lua b/modules/home-manager/neovim/nvim/lua/plugins/mini.lua deleted file mode 100644 index c3a629b..0000000 --- a/modules/home-manager/neovim/nvim/lua/plugins/mini.lua +++ /dev/null @@ -1,114 +0,0 @@ -return { -- Collection of various small independent plugins/modules - 'echasnovski/mini.nvim', - version = false, - config = function() - local keymap = vim.keymap.set - - require('mini.ai').setup { n_lines = 500 } - - require('mini.surround').setup() - - -- Simple and easy statusline. - local statusline = require 'mini.statusline' - statusline.setup { use_icons = true } - statusline.section_location = function() - return '%2l:%-2v' - end - - require('mini.basics').setup({ - options = { - extra_ui = true, - win_borders = "bold" - } - }) - - require('mini.comment').setup() - - local icons = require('mini.icons') - icons.setup() - icons.tweak_lsp_kind() - - require('mini.indentscope').setup({ - draw = { - delay = 0, - animation = require('mini.indentscope').gen_animation.none() - } - }) - - require('mini.diff').setup() - - require('mini.extra').setup() - - require('mini.jump').setup() - - -- require('mini.jump2d').setup() - - local files = require('mini.files') - files.setup() - keymap("n", "fe", function() files.open(vim.api.nvim_buf_get_name(0)) end, { noremap = true, silent = true }) - - require('mini.git').setup() - - local hipatterns = require('mini.hipatterns') - hipatterns.setup({ - highlighters = { - -- Highlight standalone 'FIXME', 'HACK', 'TODO', 'NOTE' - fixme = { pattern = '%f[%w]()FIXME()%f[%W]', group = 'MiniHipatternsFixme' }, - hack = { pattern = '%f[%w]()HACK()%f[%W]', group = 'MiniHipatternsHack' }, - todo = { pattern = '%f[%w]()TODO()%f[%W]', group = 'MiniHipatternsTodo' }, - note = { pattern = '%f[%w]()NOTE()%f[%W]', group = 'MiniHipatternsNote' }, - - -- Highlight hex color strings (`#rrggbb`) using that color - hex_color = hipatterns.gen_highlighter.hex_color(), - }, - }) - - require('mini.move').setup() - - require('mini.notify').setup() - - require('mini.pairs').setup() - - local pick = require('mini.pick') - pick.setup() - keymap("n", "ff", pick.builtin.files, { noremap = true, silent = true }) - keymap("n", "fg", pick.builtin.grep_live, { noremap = true, silent = true }) - keymap("n", "fwg", function() - local wrd = vim.fn.expand("") - pick.builtin.grep({ pattern = wrd }) - end, { noremap = true, silent = true }) - - -- require('mini.base16').setup({ - -- palette = { - -- base00 = "#303446", - -- base01 = "#292c3c", - -- base02 = "#414559", - -- base03 = "#51576d", - -- base04 = "#626880", - -- base05 = "#c6d0f5", - -- base06 = "#f2d5cf", - -- base07 = "#babbf1", - -- base08 = "#e78284", - -- base09 = "#ef9f76", - -- base0A = "#e5c890", - -- base0B = "#a6d189", - -- base0C = "#81c8be", - -- base0D = "#8caaee", - -- base0E = "#ca9ee6", - -- base0F = "#eebebe", - -- } - -- }) - -- - -- require('mini.hues').setup({ - -- foreground = '#ffffff', - -- background = '#000000', - -- n_hues = 0, - -- accent = 'orange', - -- saturation = 'high' - -- }) - - require('mini.splitjoin').setup() - - require('mini.trailspace').setup() - end, -} diff --git a/modules/home-manager/neovim/nvim/lua/plugins/neotest.lua b/modules/home-manager/neovim/nvim/lua/plugins/neotest.lua deleted file mode 100644 index a469763..0000000 --- a/modules/home-manager/neovim/nvim/lua/plugins/neotest.lua +++ /dev/null @@ -1,29 +0,0 @@ -return { - "nvim-neotest/neotest", - lazy = false, - dependencies = { - "nvim-neotest/nvim-nio", - "nvim-lua/plenary.nvim", - "antoinemadec/FixCursorHold.nvim", - "nvim-treesitter/nvim-treesitter", - "marilari88/neotest-vitest", - }, - config = function() - require("neotest").setup({ - adapters = { - require("neotest-vitest") { - -- Filter directories when searching for test files. Useful in large projects (see Filter directories notes). - filter_dir = function(name, rel_path, root) - return name ~= "node_modules" and name ~=".direnv" - end, - }, - } - }) - - vim.keymap.set("n", "tt", function() require("neotest").run.run() end) - vim.keymap.set("n", "tf", function() require("neotest").run.run(vim.fn.expand("%")) end) - vim.keymap.set("n", "ts", function() require("neotest").summary.toggle() end) - vim.keymap.set("n", "to", function() require("neotest").output.open({ enter = true }) end) - vim.keymap.set("n", "tp", function() require("neotest").output_panel.toggle() end) - end, -} diff --git a/modules/home-manager/neovim/nvim/lua/plugins/nvim-tmux-navigation.lua b/modules/home-manager/neovim/nvim/lua/plugins/nvim-tmux-navigation.lua deleted file mode 100644 index 2b3e238..0000000 --- a/modules/home-manager/neovim/nvim/lua/plugins/nvim-tmux-navigation.lua +++ /dev/null @@ -1,19 +0,0 @@ -return { - "christoomey/vim-tmux-navigator", - cmd = { - "TmuxNavigateLeft", - "TmuxNavigateDown", - "TmuxNavigateUp", - "TmuxNavigateRight", - "TmuxNavigatePrevious", - }, - keys = { - { "", "TmuxNavigateLeft" }, - { "", "TmuxNavigateDown" }, - { "", "TmuxNavigateUp" }, - { "", "TmuxNavigateRight" }, - { "", "TmuxNavigatePrevious" }, - }, -} - - diff --git a/modules/home-manager/neovim/nvim/lua/plugins/render-markdown.lua b/modules/home-manager/neovim/nvim/lua/plugins/render-markdown.lua deleted file mode 100644 index 02a17ca..0000000 --- a/modules/home-manager/neovim/nvim/lua/plugins/render-markdown.lua +++ /dev/null @@ -1,16 +0,0 @@ -return { - 'MeanderingProgrammer/render-markdown.nvim', - dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' }, -- if you use the mini.nvim suite - -- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.icons' }, -- if you use standalone mini plugins - -- dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons - ---@module 'render-markdown' - ---@type render.md.UserConfig - opts = { - -- heading = { - -- position = 'inline', - -- }, - sign = { - enabled = false, - }, - }, -} diff --git a/modules/home-manager/neovim/nvim/lua/plugins/transparent.lua b/modules/home-manager/neovim/nvim/lua/plugins/transparent.lua deleted file mode 100644 index 9c241e5..0000000 --- a/modules/home-manager/neovim/nvim/lua/plugins/transparent.lua +++ /dev/null @@ -1,4 +0,0 @@ -return { - 'xiyaowong/transparent.nvim', - lazy = false, -} diff --git a/modules/home-manager/neovim/nvim/lua/plugins/treesitter.lua b/modules/home-manager/neovim/nvim/lua/plugins/treesitter.lua deleted file mode 100644 index 50d0a18..0000000 --- a/modules/home-manager/neovim/nvim/lua/plugins/treesitter.lua +++ /dev/null @@ -1,71 +0,0 @@ -return { - { - 'nvim-treesitter/nvim-treesitter', - config = function() - require('nvim-treesitter.configs').setup({ - sync_install = false, - auto_install = true, - indent = { enable = true }, - highlight = { enable = true }, - autotag = { enable = true }, - - -- text object selection - textobjects = { - select = { - enable = true, - - -- Automatically jump forward to textobj, similar to targets.vim - lookahead = true, - - keymaps = { - -- You can use the capture groups defined in textobjects.scm - ["af"] = "@function.outer", - ["if"] = "@function.inner", - ["ac"] = "@class.outer", - ["ic"] = "@class.inner", - -- You can also use captures from other query groups like `locals.scm` - ["as"] = { query = "@scope", query_group = "locals", desc = "Select language scope" }, - }, - -- You can choose the select mode (default is charwise 'v') - -- - -- Can also be a function which gets passed a table with the keys - -- * query_string: eg '@function.inner' - -- * method: eg 'v' or 'o' - -- and should return the mode ('v', 'V', or '') or a table - -- mapping query_strings to modes. - selection_modes = { - ['@parameter.outer'] = 'v', -- charwise - ['@function.outer'] = 'V', -- linewise - ['@class.outer'] = '', -- blockwise - }, - -- If you set this to `true` (default is `false`) then any textobject is - -- extended to include preceding or succeeding whitespace. Succeeding - -- whitespace has priority in order to act similarly to eg the built-in - -- `ap`. - -- - -- Can also be a function which gets passed a table with the keys - -- * query_string: eg '@function.inner' - -- * selection_mode: eg 'v' - -- and should return true of false - include_surrounding_whitespace = true, - }, - }, - }) - vim.wo.foldmethod = 'expr' - vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()' - - function _G.MyFoldText() - local line = vim.fn.getline(vim.v.foldstart) - return line .. " 󱞣" - end - - vim.opt.foldtext = 'v:lua.MyFoldText()' - vim.opt.fillchars:append(',fold: ') - vim.opt.foldlevel = 99; - end - }, - { - 'nvim-treesitter/nvim-treesitter-textobjects' - }, -} - diff --git a/modules/home-manager/neovim/nvim/lua/plugins/undotree.lua b/modules/home-manager/neovim/nvim/lua/plugins/undotree.lua deleted file mode 100644 index e8847d9..0000000 --- a/modules/home-manager/neovim/nvim/lua/plugins/undotree.lua +++ /dev/null @@ -1,6 +0,0 @@ -return { - 'mbbill/undotree', - keys = { - { "u", vim.cmd.UndotreeToggle, desc = "Undotree" }, - } -} diff --git a/modules/home-manager/neovim/nvim/lua/plugins/wiki.lua b/modules/home-manager/neovim/nvim/lua/plugins/wiki.lua deleted file mode 100644 index bdca0c7..0000000 --- a/modules/home-manager/neovim/nvim/lua/plugins/wiki.lua +++ /dev/null @@ -1,6 +0,0 @@ -return { - 'lervag/wiki.vim', - config = function() - vim.g.wiki_root = '~/wiki' - end -} diff --git a/modules/home-manager/neovim/nvim/lua/plugins/zenmode.lua b/modules/home-manager/neovim/nvim/lua/plugins/zenmode.lua deleted file mode 100644 index 3491eff..0000000 --- a/modules/home-manager/neovim/nvim/lua/plugins/zenmode.lua +++ /dev/null @@ -1,8 +0,0 @@ -return { - "folke/zen-mode.nvim", - opts = { - window = { - width = 80, - }, - }, -} diff --git a/modules/home-manager/nixvim/default.nix b/modules/home-manager/nixvim/default.nix index 2229a09..af193e9 100644 --- a/modules/home-manager/nixvim/default.nix +++ b/modules/home-manager/nixvim/default.nix @@ -5,6 +5,10 @@ inputs.nixvim.homeManagerModules.nixvim ]; + home.packages = with pkgs; [ + alejandra + ]; + programs.nixvim = { enable = true; defaultEditor = true; @@ -228,6 +232,19 @@ servers = { nixd = { enable = true; + settings = { + formatting = { + command = [ "alejandra" ]; + }; + options = { + nix-darwin = { + expr = "(builtins.getFlake (\"git+file://\" + toString ./.)).darwinConfigurations.macbook.options"; + }; + home-manager = { + expr = "(import { configuration = ~/.config/home-manager/home.nix; pkgs = import {}; }).options"; + }; + }; + }; }; ts_ls = { enable = true;