parent
361f59ab28
commit
5c06ae218a
|
@ -19,7 +19,7 @@ in {
|
|||
|
||||
programs.emacs = {
|
||||
enable = true;
|
||||
package = pkgs.emacsUnstable;
|
||||
package = pkgs.emacsUnstable-nox;
|
||||
|
||||
init = {
|
||||
enable = true;
|
||||
|
@ -345,6 +345,10 @@ in {
|
|||
web-mode = {
|
||||
enable = true;
|
||||
mode = [ ''"\\.html\\'"'' ''"\\.tmpl\\'"'' ];
|
||||
config = ''
|
||||
(define-derived-mode typescript-tsx-mode web-mode "TypeScript-tsx")
|
||||
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . typescript-tsx-mode))
|
||||
'';
|
||||
};
|
||||
|
||||
# org-mode
|
||||
|
@ -407,45 +411,6 @@ in {
|
|||
tide.enable = true;
|
||||
typescript-mode.enable = true;
|
||||
|
||||
tree-sitter.enable = true;
|
||||
tree-sitter-langs.enable = true;
|
||||
|
||||
graphql-mode.enable = true;
|
||||
tsx-mode = {
|
||||
enable = true;
|
||||
package = epkgs:
|
||||
epkgs.trivialBuild {
|
||||
pname = "tsx-mode.el";
|
||||
packageRequires = with epkgs; [
|
||||
graphql-mode
|
||||
coverlay
|
||||
lsp-mode
|
||||
origami
|
||||
(epkgs.trivialBuild {
|
||||
pname = "tsi";
|
||||
packageRequires = with epkgs; [ tree-sitter tree-sitter-langs buttercup ];
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "orzechowskid";
|
||||
repo = "tsi.el";
|
||||
rev = "6fba6a4c61125e95c5ff744d1e9cb8ec17d6d4e4";
|
||||
sha256 = "WgaFCpZeb81AdM77/DQnDdk7mVRK+NMJcoB/DxvCMx8=";
|
||||
};
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = true;
|
||||
})
|
||||
];
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "orzechowskid";
|
||||
repo = "tsx-mode.el";
|
||||
rev = "d9d1fda2929de59082c1dc34636271d4341c3b68";
|
||||
sha256 = "fa0dHRfXVCNRiKFtW/+Zg4hWES9M+CrvJjQXiScdaTo=";
|
||||
};
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = true;
|
||||
};
|
||||
mode = [''"\\.tsx\\'"''];
|
||||
};
|
||||
|
||||
deno-fmt = {
|
||||
enable = true;
|
||||
config = ''
|
||||
|
|
|
@ -72,6 +72,7 @@
|
|||
home-manager.useUserPackages = true;
|
||||
nixpkgs.overlays = [
|
||||
emacs-overlay.overlay
|
||||
(import ./overlays/tree-sitter-typescript.nix)
|
||||
];
|
||||
})
|
||||
./common
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
final: prev: {
|
||||
tree-sitter-grammars = prev.tree-sitter-grammars // {
|
||||
tree-sitter-typescript =
|
||||
prev.tree-sitter-grammars.tree-sitter-typescript.overrideAttrs (_: {
|
||||
nativeBuildInputs = [ final.nodejs final.tree-sitter ];
|
||||
configurePhase = ''
|
||||
tree-sitter generate --abi 13 typescript/src/grammar.json
|
||||
tree-sitter generate --abi 13 tsx/src/grammar.json
|
||||
'';
|
||||
});
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue