maint: update to 25.05

This commit is contained in:
Jeremy Wall 2025-06-12 18:23:40 -04:00
parent 8bf123d387
commit 550794186a
4 changed files with 80 additions and 224 deletions

View File

@ -6,10 +6,11 @@ in
nix = { nix = {
package = pkgs.nix; package = pkgs.nix;
enable = true;
# SEE: https://github.com/NixOS/nix/issues/4119#issuecomment-1734738812 # SEE: https://github.com/NixOS/nix/issues/4119#issuecomment-1734738812
settings.sandbox = "relaxed"; settings.sandbox = "relaxed";
extraOptions = '' extraOptions = ''
experimental-features = nix-command flakes repl-flake experimental-features = nix-command flakes
extra-platforms = x86_64-darwin aarch64-darwin x86_64-linux extra-platforms = x86_64-darwin aarch64-darwin x86_64-linux
trusted-users = root zaphar trusted-users = root zaphar
''; '';
@ -347,9 +348,6 @@ in
vfkit vfkit
]; ];
# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;
#services.spacebar.enable = true; #services.spacebar.enable = true;
#services.spacebar.package = "${pkgs.spacebar}"; #services.spacebar.package = "${pkgs.spacebar}";
@ -365,6 +363,7 @@ in
(allow file-read* file-write* process-exec mach-lookup (subpath "${builtins.storeDir}")) (allow file-read* file-write* process-exec mach-lookup (subpath "${builtins.storeDir}"))
''; '';
}; };
system.primaryUser = "zaphar";
# Used for backwards compatibility, please read the changelog before changing. # Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog # $ darwin-rebuild changelog
system.stateVersion = 4; system.stateVersion = 4;

View File

@ -141,15 +141,16 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1715871485, "lastModified": 1749744770,
"narHash": "sha256-ywapEXmBBI+DVRx/YYC6+6Lk+W8vhShz1uJNvqPKzng=", "narHash": "sha256-MEM9XXHgBF/Cyv1RES1t6gqAX7/tvayBC1r/KPyK1ls=",
"owner": "lnl7", "owner": "lnl7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "cb02884fa1ff5a619a44ab5f1bcc4dedd2d623c2", "rev": "536f951efb1ccda9b968e3c9dee39fbeb6d3fdeb",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "lnl7", "owner": "lnl7",
"ref": "nix-darwin-25.05",
"repo": "nix-darwin", "repo": "nix-darwin",
"type": "github" "type": "github"
} }
@ -297,24 +298,6 @@
"inputs": { "inputs": {
"systems": "systems_9" "systems": "systems_9"
}, },
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_11": {
"inputs": {
"systems": "systems_10"
},
"locked": { "locked": {
"lastModified": 1687709756, "lastModified": 1687709756,
"narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=",
@ -329,7 +312,7 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_12": { "flake-utils_11": {
"locked": { "locked": {
"lastModified": 1649676176, "lastModified": 1649676176,
"narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=", "narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=",
@ -344,9 +327,9 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_13": { "flake-utils_12": {
"inputs": { "inputs": {
"systems": "systems_11" "systems": "systems_10"
}, },
"locked": { "locked": {
"lastModified": 1705309234, "lastModified": 1705309234,
@ -362,9 +345,9 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_14": { "flake-utils_13": {
"inputs": { "inputs": {
"systems": "systems_12" "systems": "systems_11"
}, },
"locked": { "locked": {
"lastModified": 1726560853, "lastModified": 1726560853,
@ -380,9 +363,9 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_15": { "flake-utils_14": {
"inputs": { "inputs": {
"systems": "systems_13" "systems": "systems_12"
}, },
"locked": { "locked": {
"lastModified": 1681202837, "lastModified": 1681202837,
@ -579,23 +562,6 @@
"type": "github" "type": "github"
} }
}, },
"harpoon-src": {
"flake": false,
"locked": {
"lastModified": 1706306053,
"narHash": "sha256-RjwNUuKQpLkRBX3F9o25Vqvpu3Ah1TCFQ5Dk4jXhsbI=",
"owner": "ThePrimeagen",
"repo": "harpoon",
"rev": "a38be6e0dd4c6db66997deab71fc4453ace97f9c",
"type": "github"
},
"original": {
"owner": "ThePrimeagen",
"ref": "harpoon2",
"repo": "harpoon",
"type": "github"
}
},
"heracles-flake": { "heracles-flake": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_3", "flake-compat": "flake-compat_3",
@ -801,7 +767,7 @@
}, },
"naersk_5": { "naersk_5": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_16" "nixpkgs": "nixpkgs_15"
}, },
"locked": { "locked": {
"lastModified": 1650101877, "lastModified": 1650101877,
@ -819,7 +785,7 @@
}, },
"naersk_6": { "naersk_6": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_17" "nixpkgs": "nixpkgs_16"
}, },
"locked": { "locked": {
"lastModified": 1721727458, "lastModified": 1721727458,
@ -867,28 +833,6 @@
"type": "github" "type": "github"
} }
}, },
"neovim-flake": {
"inputs": {
"flake-utils": "flake-utils_10",
"nixpkgs": "nixpkgs_12"
},
"locked": {
"dir": "contrib",
"lastModified": 1715862872,
"narHash": "sha256-FCOipXHkAbkuFw9JjEpOIJ8BkyMkjkI0Dp+SzZ4yZlw=",
"owner": "neovim",
"repo": "neovim",
"rev": "27fb62988e922c2739035f477f93cc052a4fee1e",
"type": "github"
},
"original": {
"dir": "contrib",
"owner": "neovim",
"ref": "stable",
"repo": "neovim",
"type": "github"
}
},
"nil-flake": { "nil-flake": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_5", "flake-utils": "flake-utils_5",
@ -911,8 +855,8 @@
}, },
"nil-flake_2": { "nil-flake_2": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_11", "flake-utils": "flake-utils_10",
"nixpkgs": "nixpkgs_13", "nixpkgs": "nixpkgs_12",
"rust-overlay": "rust-overlay_6" "rust-overlay": "rust-overlay_6"
}, },
"locked": { "locked": {
@ -947,16 +891,16 @@
}, },
"nixpkgs-darwin": { "nixpkgs-darwin": {
"locked": { "locked": {
"lastModified": 1735564410, "lastModified": 1749596380,
"narHash": "sha256-HB/FA0+1gpSs8+/boEavrGJH+Eq08/R2wWNph1sM1Dg=", "narHash": "sha256-7DEKr2x/jIAKkwHPNNjG6lGUz9nk8SGrbyaeAFMtN34=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "1e7a8f391f1a490460760065fa0630b5520f9cf8", "rev": "210a4a2e3d3853be3a6017e68d2897771fdace35",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "nixpkgs-24.05-darwin", "ref": "nixpkgs-25.05-darwin",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -994,22 +938,6 @@
} }
}, },
"nixpkgs_12": { "nixpkgs_12": {
"locked": {
"lastModified": 1715787315,
"narHash": "sha256-cYApT0NXJfqBkKcci7D9Kr4CBYZKOQKDYA23q8XNuWg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "33d1e753c82ffc557b4a585c77de43d4c922ebb5",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_13": {
"locked": { "locked": {
"lastModified": 1690441914, "lastModified": 1690441914,
"narHash": "sha256-Ac+kJQ5z9MDAMyzSc0i0zJDx2i3qi9NjlW5Lz285G/I=", "narHash": "sha256-Ac+kJQ5z9MDAMyzSc0i0zJDx2i3qi9NjlW5Lz285G/I=",
@ -1025,23 +953,23 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_14": { "nixpkgs_13": {
"locked": { "locked": {
"lastModified": 1749123672, "lastModified": 1749747690,
"narHash": "sha256-x8ElRL7SBDDGk282ayqaOs5kVlIB8O1cICeHNKeeNPw=", "narHash": "sha256-FPhMfYq+ngKpZiYaOblqR6S9z9JVpTlW8EaQ98xwkkU=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "42e9ed325316e9ca4c56dbf44d561823d4defd01", "rev": "f7d4856c2d1af130193777964535304fdc76e368",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "release-24.11", "ref": "release-25.05",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs_15": { "nixpkgs_14": {
"locked": { "locked": {
"lastModified": 1689850295, "lastModified": 1689850295,
"narHash": "sha256-fUYf6WdQlhd2H+3aR8jST5dhFH1d0eE22aes8fNIfyk=", "narHash": "sha256-fUYf6WdQlhd2H+3aR8jST5dhFH1d0eE22aes8fNIfyk=",
@ -1057,7 +985,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_16": { "nixpkgs_15": {
"locked": { "locked": {
"lastModified": 1650109093, "lastModified": 1650109093,
"narHash": "sha256-tqlnKrAdJktRLXTou9le0oTqrYBAFpGscV5RADdpArU=", "narHash": "sha256-tqlnKrAdJktRLXTou9le0oTqrYBAFpGscV5RADdpArU=",
@ -1071,6 +999,20 @@
"type": "indirect" "type": "indirect"
} }
}, },
"nixpkgs_16": {
"locked": {
"lastModified": 1729658218,
"narHash": "sha256-9Rg+AqLqvqqJniP/OQB3GtgXoAd8IlazsHp97va042Y=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "dfffb2e7a52d29a0ef8e21ec8a0f30487b227f1a",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_17": { "nixpkgs_17": {
"locked": { "locked": {
"lastModified": 1729658218, "lastModified": 1729658218,
@ -1086,20 +1028,6 @@
} }
}, },
"nixpkgs_18": { "nixpkgs_18": {
"locked": {
"lastModified": 1729658218,
"narHash": "sha256-9Rg+AqLqvqqJniP/OQB3GtgXoAd8IlazsHp97va042Y=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "dfffb2e7a52d29a0ef8e21ec8a0f30487b227f1a",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_19": {
"locked": { "locked": {
"lastModified": 1682109806, "lastModified": 1682109806,
"narHash": "sha256-d9g7RKNShMLboTWwukM+RObDWWpHKaqTYXB48clBWXI=", "narHash": "sha256-d9g7RKNShMLboTWwukM+RObDWWpHKaqTYXB48clBWXI=",
@ -1253,7 +1181,7 @@
}, },
"nurl-flake_2": { "nurl-flake_2": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_15" "nixpkgs": "nixpkgs_14"
}, },
"locked": { "locked": {
"lastModified": 1701273941, "lastModified": 1701273941,
@ -1277,14 +1205,12 @@
"d2-vim-src": "d2-vim-src_2", "d2-vim-src": "d2-vim-src_2",
"darwin": "darwin_2", "darwin": "darwin_2",
"durnitisp-flake": "durnitisp-flake", "durnitisp-flake": "durnitisp-flake",
"harpoon-src": "harpoon-src",
"heracles-flake": "heracles-flake", "heracles-flake": "heracles-flake",
"jujutsu-flake": "jujutsu-flake", "jujutsu-flake": "jujutsu-flake",
"mcphub-flake": "mcphub-flake", "mcphub-flake": "mcphub-flake",
"neogit-src": "neogit-src_2", "neogit-src": "neogit-src_2",
"neovim-flake": "neovim-flake",
"nil-flake": "nil-flake_2", "nil-flake": "nil-flake_2",
"nixpkgs": "nixpkgs_14", "nixpkgs": "nixpkgs_13",
"nixpkgs-darwin": "nixpkgs-darwin", "nixpkgs-darwin": "nixpkgs-darwin",
"nurl-flake": "nurl-flake_2", "nurl-flake": "nurl-flake_2",
"roslyn-lsp": "roslyn-lsp_2", "roslyn-lsp": "roslyn-lsp_2",
@ -1333,7 +1259,7 @@
"runwhen-flake": { "runwhen-flake": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_4", "flake-compat": "flake-compat_4",
"flake-utils": "flake-utils_12", "flake-utils": "flake-utils_11",
"naersk": "naersk_5" "naersk": "naersk_5"
}, },
"locked": { "locked": {
@ -1375,7 +1301,7 @@
}, },
"rust-overlay-flake": { "rust-overlay-flake": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_13", "flake-utils": "flake-utils_12",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]
@ -1530,9 +1456,9 @@
}, },
"sheetsui-flake": { "sheetsui-flake": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_14", "flake-utils": "flake-utils_13",
"naersk": "naersk_6", "naersk": "naersk_6",
"nixpkgs": "nixpkgs_18", "nixpkgs": "nixpkgs_17",
"rust-overlay": "rust-overlay_7" "rust-overlay": "rust-overlay_7"
}, },
"locked": { "locked": {
@ -1552,10 +1478,10 @@
"sile-flake": { "sile-flake": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_5", "flake-compat": "flake-compat_5",
"flake-utils": "flake-utils_15", "flake-utils": "flake-utils_14",
"gitignore": "gitignore", "gitignore": "gitignore",
"libtexpdf-src": "libtexpdf-src", "libtexpdf-src": "libtexpdf-src",
"nixpkgs": "nixpkgs_19" "nixpkgs": "nixpkgs_18"
}, },
"locked": { "locked": {
"lastModified": 1694595810, "lastModified": 1694595810,
@ -1631,21 +1557,6 @@
"type": "github" "type": "github"
} }
}, },
"systems_13": {
"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": { "systems_2": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,

View File

@ -1,15 +1,15 @@
{ {
inputs = { inputs = {
# Default to sane nixpkgs versions # Default to sane nixpkgs versions
nixpkgs.url = "github:nixos/nixpkgs/release-24.11"; nixpkgs.url = "github:nixos/nixpkgs/release-25.05";
unstable.url = "nixpkgs"; unstable.url = "nixpkgs";
nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-24.05-darwin"; nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-25.05-darwin";
#lean4-flake = { #lean4-flake = {
# url = "github:leanprover/lean4/v4.4.0"; # url = "github:leanprover/lean4/v4.4.0";
# inputs.nixpkgs.follows = "nixpkgs"; # inputs.nixpkgs.follows = "nixpkgs";
#}; #};
darwin = { darwin = {
url = "github:lnl7/nix-darwin"; url = "github:lnl7/nix-darwin/nix-darwin-25.05";
# ensure that darwinSystem uses our nixpkgs version # ensure that darwinSystem uses our nixpkgs version
inputs.nixpkgs.follows = "nixpkgs-darwin"; inputs.nixpkgs.follows = "nixpkgs-darwin";
}; };
@ -31,20 +31,16 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
neovim-flake = { #neovim-flake = {
url = "github:neovim/neovim/stable?dir=contrib"; # url = "github:neovim/neovim/stable?dir=contrib";
# NOTE(jeremy): Currently this needs a newer nixpkgs version # # NOTE(jeremy): Currently this needs a newer nixpkgs version
#inputs.nixpkgs.follows = "nixpkgs"; # #inputs.nixpkgs.follows = "nixpkgs";
}; #};
jujutsu-flake.url = "github:martinvonz/jj"; jujutsu-flake.url = "github:martinvonz/jj";
custom-flakes = { custom-flakes = {
url = "github:zaphar/nix-flakes"; url = "github:zaphar/nix-flakes";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
harpoon-src = {
url = "github:ThePrimeagen/harpoon/harpoon2";
flake = false;
};
neogit-src = { neogit-src = {
url = "github:NeogitOrg/neogit"; url = "github:NeogitOrg/neogit";
flake = false; flake = false;
@ -76,11 +72,9 @@
agenix-flake, agenix-flake,
nil-flake, nil-flake,
nurl-flake, nurl-flake,
harpoon-src,
custom-flakes, custom-flakes,
unstable, unstable,
heracles-flake, heracles-flake,
neovim-flake,
clio-flake, clio-flake,
sheetsui-flake, sheetsui-flake,
mcphub-flake, mcphub-flake,
@ -93,15 +87,6 @@
in in
{ config, pkgs, ...}: let { config, pkgs, ...}: let
unstablePkgs = import unstable { inherit system; }; unstablePkgs = import unstable { inherit system; };
possession-nvim = pkgs.callPackage ./possession-nvim.nix {
inherit (pkgs.vimUtils) buildVimPlugin;
inherit (pkgs) fetchFromGitHub;
};
harpoon-nvim = pkgs.vimUtils.buildVimPlugin {
pname = "harpoon";
version = "2024-01-28";
src = harpoon-src;
};
neogit-nvim = custom-flakes.packages."${system}".neogit-nvim; neogit-nvim = custom-flakes.packages."${system}".neogit-nvim;
d2-vim = custom-flakes.packages."${system}".d2-vim; d2-vim = custom-flakes.packages."${system}".d2-vim;
hunk-nvim = custom-flakes.packages."${system}".hunk-nvim; hunk-nvim = custom-flakes.packages."${system}".hunk-nvim;
@ -110,7 +95,6 @@
nvim-treesitter-context = custom-flakes.packages."${system}".nvim-treesitter-context; nvim-treesitter-context = custom-flakes.packages."${system}".nvim-treesitter-context;
roslyn-nvim = custom-flakes.packages."${system}".roslyn-nvim; roslyn-nvim = custom-flakes.packages."${system}".roslyn-nvim;
ionide-nvim = custom-flakes.packages."${system}".ionide-nvim; ionide-nvim = custom-flakes.packages."${system}".ionide-nvim;
nvim = neovim-flake.packages."${system}".neovim;
# TODO(zaphar): Until nixpkgs update to a newer version of tree-sitter the queries will be wrong # TODO(zaphar): Until nixpkgs update to a newer version of tree-sitter the queries will be wrong
# for csharp # for csharp
#tree-sitter-csharp = pkgs.callPackage ./nvim-treesitter-csharp.nix { #tree-sitter-csharp = pkgs.callPackage ./nvim-treesitter-csharp.nix {
@ -137,7 +121,6 @@
nixpkgs.overlays = [ nixpkgs.overlays = [
(final: prev: { (final: prev: {
custom-neovim = nvim;
lorri = unstablePkgs.lorri; lorri = unstablePkgs.lorri;
avante-nvim = unstablePkgs.vimPlugins.avante-nvim; avante-nvim = unstablePkgs.vimPlugins.avante-nvim;
copilot-lua = unstablePkgs.vimPlugins.copilot-lua; copilot-lua = unstablePkgs.vimPlugins.copilot-lua;
@ -147,7 +130,7 @@
neovim.enable = true; neovim.enable = true;
neovim.vimAlias = true; neovim.vimAlias = true;
neovim.viAlias = true; neovim.viAlias = true;
neovim.package = pkgs.custom-neovim; #neovim.package = pkgs.custom-neovim;
neovim.configure = { neovim.configure = {
customRC = "lua << EOF customRC = "lua << EOF
${builtins.readFile ./init.lua} ${builtins.readFile ./init.lua}
@ -225,8 +208,6 @@ EOF";
direnv-vim direnv-vim
mcphub-nvim mcphub-nvim
]) ++ [ ]) ++ [
possession-nvim
harpoon-nvim
d2-vim d2-vim
hunk-nvim hunk-nvim
neogit-nvim neogit-nvim
@ -319,13 +300,11 @@ EOF";
}; };
}; };
environment.systemPackages = (with pkgs; [ environment.systemPackages = (with pkgs; [
isabelle
sheetsui sheetsui
lean4 lean4
quint quint
quint-lsp quint-lsp
terraform # TODO(jeremy): Replace with opentofu when that is an option. terraform # TODO(jeremy): Replace with opentofu when that is an option.
nomad
oha oha
nodejs nodejs
gnumake gnumake

View File

@ -164,23 +164,26 @@ local caps = vim.tbl_deep_extend(
local lspconfig = require("lspconfig") local lspconfig = require("lspconfig")
local configure_lsp = function(name, config)
vim.lsp.enable(name)
vim.lsp.config(name, config)
end
-- Typst -- Typst
lspconfig.tinymist.setup { configure_lsp('tinymist', {
capabilities = caps, capabilities = caps,
settings = { settings = {
exportPdf = "onSave", exportPdf = "onSave",
}, },
} })
-- Terraform lsp setup -- Terraform lsp setup
lspconfig.terraformls.setup {} configure_lsp('terraformls', {})
-- Nix language server support -- Nix language server support
lspconfig.nil_ls.setup { configure_lsp('nil_ls', {
capabilities = caps, capabilities = caps,
} })
lspconfig.jedi_language_server.setup {}
require('roslyn').setup({ require('roslyn').setup({
-- client, bufnr -- client, bufnr
@ -193,22 +196,22 @@ require('roslyn').setup({
}); });
--ocaml --ocaml
lspconfig.ocamllsp.setup { configure_lsp('ocamllsp', {
capabilities = caps capabilities = caps
} })
-- Java language server support -- Java language server support
lspconfig.java_language_server.setup { configure_lsp('java_language_server', {
capabilities = caps capabilities = caps
} })
-- Typescript language server support -- Typescript language server support
lspconfig.tsserver.setup { configure_lsp('tsserver', {
capabilities = caps capabilities = caps
} })
-- Rust language server support -- Rust language server support
lspconfig.rust_analyzer.setup { configure_lsp('rust_analyzer', {
settings = { settings = {
-- https://github.com/rust-lang/rust-analyzer/blob/master/docs/user/generated_config.adoc -- https://github.com/rust-lang/rust-analyzer/blob/master/docs/user/generated_config.adoc
['rust-analyzer'] = { ['rust-analyzer'] = {
@ -216,10 +219,10 @@ lspconfig.rust_analyzer.setup {
} }
}, },
capabilities = caps capabilities = caps
} })
-- lua language server setup. -- lua language server setup.
lspconfig.lua_ls.setup { configure_lsp('lua_ls', {
settings = { settings = {
Lua = { Lua = {
runtime = { version = 'LuaJIT', }, runtime = { version = 'LuaJIT', },
@ -239,7 +242,7 @@ lspconfig.lua_ls.setup {
}, },
}, },
capabilities = caps capabilities = caps
} })
-- lsp configuration -- lsp configuration
vim.api.nvim_create_autocmd('LspAttach', { vim.api.nvim_create_autocmd('LspAttach', {
@ -469,33 +472,6 @@ vim.keymap.set("n", "<Leader>ga", function()
vim.cmd("!git add %") vim.cmd("!git add %")
end) end)
require('possession').setup {
commands = {
save = 'SSave',
load = 'SLoad',
delete = 'SDelete',
list = 'SList',
},
autosave = {
current = true,
on_load = true,
on_quit = true,
},
telescope = {
list = {
default_action = 'load',
mappings = {
save = { n = '<c-x>', i = '<c-x>' },
load = { n = '<c-v>', i = '<c-v>' },
delete = { n = '<c-t>', i = '<c-t>' },
rename = { n = '<c-r>', i = '<c-r>' },
},
},
},
}
telescope.load_extension('possession')
-- https://github.com/nvim-telescope/telescope.nvim -- https://github.com/nvim-telescope/telescope.nvim
telescope.setup({ telescope.setup({
defaults = { defaults = {
@ -517,9 +493,6 @@ telescope.setup({
}, },
}) })
local harpoon = require('harpoon')
harpoon:setup()
local lean = require 'lean' local lean = require 'lean'
@ -538,7 +511,6 @@ lean.setup {
} }
-- telescope keymaps -- telescope keymaps
vim.keymap.set("n", "<Leader>pl", telescope.extensions.possession.list)
-- TODO(zaphar): Remove this once my muscle memory has set in. -- TODO(zaphar): Remove this once my muscle memory has set in.
vim.keymap.set("n", "<Leader>nff", telescope_builtins.fd) vim.keymap.set("n", "<Leader>nff", telescope_builtins.fd)
vim.keymap.set("n", "<Leader>ff", telescope_builtins.fd) vim.keymap.set("n", "<Leader>ff", telescope_builtins.fd)
@ -554,11 +526,6 @@ end)
vim.keymap.set("n", "<leader>lds", telescope_builtins.lsp_document_symbols, { desc = "[D]ocument [S]ymbols" }) vim.keymap.set("n", "<leader>lds", telescope_builtins.lsp_document_symbols, { desc = "[D]ocument [S]ymbols" })
vim.keymap.set("n", "<leader>lws", telescope_builtins.lsp_dynamic_workspace_symbols, { desc = "[W]orkspace [S]ymbols" }) vim.keymap.set("n", "<leader>lws", telescope_builtins.lsp_dynamic_workspace_symbols, { desc = "[W]orkspace [S]ymbols" })
-- harpoon keymaps
vim.keymap.set("n", "<Leader>ha", function() harpoon:list():append() end)
vim.keymap.set("n", "<Leader>he", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
vim.keymap.set("n", "<Leader>hj", function() harpoon:list():prev() end)
vim.keymap.set("n", "<Leader>hk", function() harpoon:list():next() end)
-- codelens keymaps -- codelens keymaps
vim.keymap.set("n", "<Leader>rr", vim.lsp.codelens.run) vim.keymap.set("n", "<Leader>rr", vim.lsp.codelens.run)