diff --git a/README.md b/README.md index 6dc13fd..20d8d04 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,17 @@ # 4o1x5's neovim configuration +### Language support + +Many languages are supported by default with formatters and linters. A few notable: + +- Rust +- Typescript +- C# +- Lua +- Python + +[and much more..](./config/plugins/lang/) + ## Run with nix ```bash diff --git a/config/plugins/lang/csharp.nix b/config/plugins/lang/csharp.nix index 7fae402..16e8196 100644 --- a/config/plugins/lang/csharp.nix +++ b/config/plugins/lang/csharp.nix @@ -2,8 +2,21 @@ { plugins = { - # TODO lint lsp.servers.csharp_ls.enable = true; + conform-nvim.settings = { + formatters_by_ft = { + dotnet = [ "dotnet" ]; + }; + + formatters = { + dotnet = { + command = "${pkgs.dotnet-sdk_8 }/bin/dotnet format"; + }; + }; + }; + + # TODO lint + }; } diff --git a/config/plugins/lang/default.nix b/config/plugins/lang/default.nix index 700ad47..042b717 100644 --- a/config/plugins/lang/default.nix +++ b/config/plugins/lang/default.nix @@ -4,6 +4,7 @@ imports = [ ./css.nix ./docker.nix + ./elixir.nix ./html.nix ./json.nix ./lua.nix diff --git a/config/plugins/lang/elixir.nix b/config/plugins/lang/elixir.nix new file mode 100644 index 0000000..5345b60 --- /dev/null +++ b/config/plugins/lang/elixir.nix @@ -0,0 +1,26 @@ +{ pkgs, ... }: +{ + plugins = { + lsp.servers.elixirls.enable = true; + + conform-nvim.settings = { + formatters_by_ft = { + elixir = [ "elixir" ]; + }; + + formatters = { + elixir = { + command = "${pkgs.elixir}/bin/mix format"; + }; + }; + }; + + # TODO use credo to lint + #lint = { + # lintersByFt.elixir = [ "elixir" ]; + # linters.elixir.cmd = "${pkgs.elixir}/bin/mix deps.get"; + #}; + + }; +} +