update formatting

This commit is contained in:
Osman Faruk Bayram 2025-02-08 16:53:35 +03:00
parent b6b29f3a1a
commit 1d1a1e95b6
6 changed files with 35 additions and 85 deletions

View file

@ -1,5 +1 @@
{
colorschemes = {
gruvbox.enable = true;
};
}
{ colorschemes = { gruvbox.enable = true; }; }

View file

@ -1,13 +1,7 @@
{ lib, ... }:
let
definitions = lib.attrNames (
lib.filterAttrs
(filename: kind:
filename != "default.nix"
&& (kind == "regular" || kind == "directory")
)
(builtins.readDir ./.)
);
in
lib.mkMerge (map (file: import ./${file}) definitions)
definitions = lib.attrNames (lib.filterAttrs (filename: kind:
filename != "default.nix" && (kind == "regular" || kind == "directory"))
(builtins.readDir ./.));
in lib.mkMerge (map (file: import ./${file}) definitions)

View file

@ -13,7 +13,8 @@
tabstop = 4; # Number of spaces that a <Tab> in the file counts for.
shiftwidth = 4; # how many spaces are added in an indent
softtabstop = 4; # how many spaces are added when pressing tab
smarttab = true; # When on, a <Tab> in front of a line inserts blanks according to 'shiftwidth'. 'tabstop' or 'softtabstop' is used in other places.
smarttab =
true; # When on, a <Tab> in front of a line inserts blanks according to 'shiftwidth'. 'tabstop' or 'softtabstop' is used in other places.
# TODO: i want to see 4 spaces when i press tab in python and 2 spaces in nix using setlocal
# is it possible for me to set this per language?

View file

@ -1,10 +1,7 @@
_:
{
imports = [
./config
./plugins
];
imports = [ ./config ./plugins ];
config = {
# Use <Space> as leader key

View file

@ -1,5 +1,6 @@
{
description = "My custom neovim configuration that has been mixed and matched from various sources";
description =
"My custom neovim configuration that has been mixed and matched from various sources";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
@ -14,12 +15,7 @@
nixvim.url = "github:nix-community/nixvim";
};
outputs =
{ nixpkgs
, nixvim
, nix-formatter-pack
, ...
}:
outputs = { nixpkgs, nixvim, nix-formatter-pack, ... }:
let
forAllSystems = nixpkgs.lib.genAttrs [
"aarch64-linux"
@ -28,19 +24,17 @@
"aarch64-darwin"
"x86_64-darwin"
];
in
{
in {
formatter = forAllSystems (system:
nix-formatter-pack.lib.mkFormatter {
pkgs = nixpkgs.legacyPackages.${system};
config.tools = {
deadnix.enable = true;
nixpkgs-fmt.enable = true;
nixfmt.enable = true;
statix.enable = true;
};
}
);
});
packages = forAllSystems (system:
let
@ -56,11 +50,9 @@
};
};
in
{
in {
default = mkNixvim { };
lite = mkNixvim { withLSP = false; };
}
);
});
};
}

View file

@ -25,34 +25,26 @@
todo-comments.enable = true;
lsp = {
servers = {
nixd = {
enable = true;
settings =
let
flake = ''(builtins.getFlake "${self}")'';
in
{
nixpkgs.expr = "import ${flake}.inputs.nixpkgs { }";
formatting = {
command = [ "${lib.getExe pkgs.nixfmt-rfc-style}" ];
};
settings = let flake = ''(builtins.getFlake "${self}")'';
in {
nixpkgs.expr = "import ${flake}.inputs.nixpkgs { }";
formatting = {
command = [ "${lib.getExe pkgs.nixfmt-rfc-style}" ];
};
};
};
typos_lsp = {
enable = true;
extraOptions = {
init_options = {
diagnosticSeverity = "Hint";
};
};
extraOptions = { init_options = { diagnosticSeverity = "Hint"; }; };
};
pylsp = {
enable = true;
settings = {
configurationSources = ["flake8"];
configurationSources = [ "flake8" ];
plugins = {
pycodestyle = {
enabled = true;
@ -66,39 +58,17 @@
};
};
astro = {
enable = true;
};
arduino_language_server = {
enable = true;
};
bashls= {
enable = true;
};
clangd = {
enable = true;
};
dartls = {
enable = true;
};
lua_ls = {
enable = true;
};
mdx_analyzer = {
enable = true;
};
fish_lsp = {
enable = true;
};
docker_compose_language_service = {
enable = true;
};
dockerls = {
enable = true;
};
marksman = {
enable = true;
};
astro = { enable = true; };
arduino_language_server = { enable = true; };
bashls = { enable = true; };
clangd = { enable = true; };
dartls = { enable = true; };
lua_ls = { enable = true; };
mdx_analyzer = { enable = true; };
fish_lsp = { enable = true; };
docker_compose_language_service = { enable = true; };
dockerls = { enable = true; };
marksman = { enable = true; };
};
};
};