Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to Alejandra formatter #61

Merged
merged 3 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
});
}