Skip to content

Commit

Permalink
feat(emacs): langs: add C#
Browse files Browse the repository at this point in the history
  • Loading branch information
gekoke committed Apr 4, 2024
1 parent 99872ea commit 8f7c4a5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions modules/nixos/programs/emacs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ in
nodePackages.typescript-language-server
# Terraform
terraform
# CSharp
omnisharp-roslyn
dotnet-sdk_8
];

elementary.home = {
Expand All @@ -91,6 +94,8 @@ in
(add-to-list 'lsp-java-vmargs "-javaagent:${pkgs.elementary.lombok-jar}/share/java/lombok.jar")
(setq lsp-clients-typescript-tls-path ${pkgs.nodePackages.typescript-language-server}/bin/typescript-language-server)
(setq lsp-csharp-server-path "${pkgs.omnisharp-roslyn}/bin/OmniSharp")
'';
};
file = {
Expand Down
9 changes: 8 additions & 1 deletion modules/nixos/programs/emacs/init.el
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@
:config
(remember-last-theme-enable))

(set-face-attribute 'default nil :family "JetBrains Mono Nerd Font" :height 110 :weight 'semi-bold)
(set-face-attribute 'default nil :family "Iosevka Term Nerd Font" :height 130 :weight 'semi-bold)

(use-package ligature
:config
Expand Down Expand Up @@ -623,6 +623,7 @@
(use-package treesit-auto
:config
(delete 'yaml treesit-auto-langs) ;; yaml-mode is superior
(delete 'c-sharp treesit-auto-langs) ;; csharp-ts-mode highlighting sucks
(global-treesit-auto-mode))

(use-package yasnippet)
Expand Down Expand Up @@ -736,6 +737,12 @@
(typescript-ts-mode . lsp)
(tsx-ts-mode . lsp))

(use-package emacs
:ensure nil
:hook
(csharp-mode . lsp)
(csharp-ts-mode . lsp))

(use-package emacs
:ensure nil
:mode
Expand Down

0 comments on commit 8f7c4a5

Please sign in to comment.