user/neovim: switch to nixd
This commit is contained in:
parent
21dc584199
commit
4dfc898140
4 changed files with 33 additions and 6 deletions
|
|
@ -1,5 +1,6 @@
|
|||
{ config, lib, pkgs, ... }: {
|
||||
{ config, inputs, pkgs, ... }: {
|
||||
nix = {
|
||||
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||
package = pkgs.nixVersions.latest;
|
||||
|
||||
settings = rec {
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, pkgs, sysConfig, ... }:
|
||||
let
|
||||
luaconf = pkgs.writeText "config.lua"
|
||||
(lib.replaceStrings
|
||||
["{{OMNISHARP_PATH}}" "{{DART_PATH}}" "{{CATPPUCCIN_FLAVOUR}}"]
|
||||
["${pkgs.omnisharp-roslyn}/bin/OmniSharp" "${pkgs.dart}/bin/dart" config.catppuccin.nvim.flavor]
|
||||
["{{OMNISHARP_PATH}}" "{{DART_PATH}}" "{{CATPPUCCIN_FLAVOUR}}" "{{USERNAME}}" "{{HOSTNAME}}"]
|
||||
["${pkgs.omnisharp-roslyn}/bin/OmniSharp" "${pkgs.dart}/bin/dart" config.catppuccin.nvim.flavor config.home.username sysConfig.networking.hostName]
|
||||
(builtins.readFile ../../res/config.lua));
|
||||
in {
|
||||
systemd.user.tmpfiles.rules = [
|
||||
|
|
@ -21,6 +21,7 @@ in {
|
|||
withRuby = false;
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
nixd
|
||||
rust-analyzer
|
||||
texlab
|
||||
astro-language-server
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ vim.diagnostic.config({
|
|||
|
||||
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
|
||||
|
||||
local servers = { 'astro', 'clangd', 'cssls', 'html', 'nil_ls', 'tailwindcss', 'texlab', 'ts_ls', 'yamlls' }
|
||||
local servers = { 'astro', 'clangd', 'cssls', 'html', 'tailwindcss', 'texlab', 'ts_ls', 'yamlls' }
|
||||
for _, lsp in ipairs(servers) do
|
||||
vim.lsp.config(lsp, {
|
||||
capabilities = capabilities,
|
||||
|
|
@ -292,6 +292,32 @@ vim.lsp.config("diagnosticls", {
|
|||
})
|
||||
vim.lsp.enable("diagnosticls")
|
||||
|
||||
-- LSP/nixd
|
||||
vim.lsp.config("nixd", {
|
||||
cmd = { "nixd" },
|
||||
filetypes = { "nix" },
|
||||
root_markers = { "flake.nix", ".git" },
|
||||
settings = {
|
||||
nixd = {
|
||||
nixpkgs = {
|
||||
expr = "import <nixpkgs> { }",
|
||||
},
|
||||
formatting = {
|
||||
command = { "nixfmt" },
|
||||
},
|
||||
options = {
|
||||
nixos = {
|
||||
expr = '(builtins.getFlake (toString ./.)).nixosConfigurations.{{HOSTNAME}}.options',
|
||||
},
|
||||
home_manager = {
|
||||
expr = '(builtins.getFlake (builtins.toString ./.)).nixosConfigurations."{{USERNAME}}@{{HOSTNAME}}".options.home-manager.users.type.getSubOptions []',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
vim.lsp.enable("nixd")
|
||||
|
||||
-- LSP/Signatures
|
||||
require("lsp_signature").setup {
|
||||
hint_enable = false,
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ in {
|
|||
ffmpeg
|
||||
gnupg
|
||||
kitty
|
||||
nil
|
||||
nodejs_latest
|
||||
pamixer
|
||||
pnpm
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue