Skip to content

Commit

Permalink
Merge pull request #61 from redyf/dev
Browse files Browse the repository at this point in the history
Switch to Alejandra formatter
  • Loading branch information
redyf authored Feb 12, 2024
2 parents e22d5c2 + 216f4d2 commit 5dbdccf
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 25 deletions.
14 changes: 7 additions & 7 deletions config/lsp/lsp.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
enable = true;
capabilities = "offsetEncoding = 'utf-16'";
servers = {
clangd = {enable = true;};
clangd = { enable = true; };
lua-ls = {
enable = true;
extraOptions = {
Expand All @@ -19,15 +19,15 @@
telemetry = {
enabled = false;
};
hint = {enable = true;};
hint = { enable = true; };
};
};
};
};
nil_ls = {enable = true;};
nil_ls = { enable = true; };
tsserver = {
enable = false;
filetypes = ["javascript" "javascriptreact" "typescript" "typescriptreact"];
filetypes = [ "javascript" "javascriptreact" "typescript" "typescriptreact" ];
extraOptions = {
settings = {
javascript = {
Expand Down Expand Up @@ -55,9 +55,9 @@
};
};
};
eslint = {enable = true;};
pyright = {enable = true;};
ruff-lsp = {enable = true;};
eslint = { enable = true; };
pyright = { enable = true; };
ruff-lsp = { enable = true; };

rust-analyzer = {
enable = true;
Expand Down
11 changes: 6 additions & 5 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 16 additions & 13 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,20 @@
flake-utils.url = "github:numtide/flake-utils";
};

outputs = {
self,
nixpkgs,
nixvim,
flake-utils,
...
} @ inputs: let
config = import ./config; # import the module directly
in
flake-utils.lib.eachDefaultSystem (system: let
outputs =
{ self
, nixpkgs
, nixvim
, flake-utils
, ...
} @ inputs:
let
config = import ./config; # import the module directly
in
flake-utils.lib.eachDefaultSystem (system:
let
nixvimLib = nixvim.lib.${system};
pkgs = import nixpkgs {inherit system;};
pkgs = import nixpkgs { inherit system; };
nixvim' = nixvim.legacyPackages.${system};
nvim = nixvim'.makeNixvimWithModule {
inherit pkgs;
Expand All @@ -27,7 +29,8 @@
inherit self;
};
};
in {
in
{
checks = {
# Run `nix flake check .` to verify that your config is not broken
default = nixvimLib.check.mkTestDerivationFromNvim {
Expand All @@ -41,6 +44,6 @@
default = nvim;
};

formatter = pkgs.nixpkgs-fmt;
formatter = pkgs.alejandra;
});
}

0 comments on commit 5dbdccf

Please sign in to comment.