Skip to content

Commit 9788a0f

Browse files
committed
feat(hosts/crona): add neovim configuration for web development with astro
1 parent a3991c6 commit 9788a0f

2 files changed

Lines changed: 81 additions & 0 deletions

File tree

‎nix/hosts/crona/home.nix‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ in
4848
yazi.enable = true;
4949
};
5050

51+
programs.secretspec = {
52+
enable = true;
53+
54+
settings.defaults = {
55+
provider = "dotenv";
56+
};
57+
};
58+
5159
programs.zoxide = {
5260
enable = true;
5361
options = [ "--cmd cd" ];

‎nix/hosts/crona/neovim.nix‎

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,48 @@ in
8181
expandtab = true;
8282
};
8383

84+
files."ftplugin/json.lua".localOpts = {
85+
shiftwidth = 2;
86+
tabstop = 2;
87+
softtabstop = 2;
88+
expandtab = true;
89+
};
90+
91+
files."ftplugin/css.lua".localOpts = {
92+
shiftwidth = 2;
93+
tabstop = 2;
94+
softtabstop = 2;
95+
expandtab = true;
96+
};
97+
98+
files."ftplugin/html.lua".localOpts = {
99+
shiftwidth = 2;
100+
tabstop = 2;
101+
softtabstop = 2;
102+
expandtab = true;
103+
};
104+
105+
files."ftplugin/astro.lua".localOpts = {
106+
shiftwidth = 2;
107+
tabstop = 2;
108+
softtabstop = 2;
109+
expandtab = true;
110+
};
111+
112+
files."ftplugin/typescript.lua".localOpts = {
113+
shiftwidth = 2;
114+
tabstop = 2;
115+
softtabstop = 2;
116+
expandtab = true;
117+
};
118+
119+
files."ftplugin/javascript.lua".localOpts = {
120+
shiftwidth = 2;
121+
tabstop = 2;
122+
softtabstop = 2;
123+
expandtab = true;
124+
};
125+
84126
colorschemes.catppuccin = {
85127
enable = true;
86128

@@ -101,12 +143,18 @@ in
101143
indent.enable = true;
102144

103145
grammarPackages = [
146+
grammars.astro
104147
grammars.bash
148+
grammars.css
149+
grammars.javascript
150+
grammars.json
105151
grammars.just
106152
grammars.lua
107153
grammars.markdown
108154
grammars.nix
155+
grammars.svelte
109156
grammars.toml
157+
grammars.typescript
110158
grammars.xml
111159
grammars.yaml
112160
];
@@ -122,11 +170,19 @@ in
122170
};
123171

124172
formatters_by_ft = {
173+
astro = [ "prettier" ];
174+
css = [ "prettier" ];
175+
html = [ "prettier" ];
176+
javascript = [ "prettier" ];
177+
json = [ "prettier" ];
125178
nix = [ "nixfmt" ];
179+
svelte = [ "prettier" ];
180+
typescript = [ "prettier" ];
126181
};
127182

128183
formatters = {
129184
nixfmt.command = lib.getExe pkgs.nixfmt;
185+
prettier.command = lib.getExe pkgs.prettier;
130186
};
131187
};
132188
};
@@ -135,7 +191,24 @@ in
135191
enable = true;
136192

137193
servers = {
194+
astro.enable = true;
195+
cssls.enable = true;
196+
html.enable = true;
197+
jsonls.enable = true;
138198
nixd.enable = true;
199+
svelte.enable = true;
200+
tailwindcss.enable = true;
201+
ts_ls.enable = true;
202+
};
203+
};
204+
205+
plugins.blink-cmp = {
206+
enable = true;
207+
208+
settings.keymap = {
209+
preset = "enter";
210+
"<Tab>" = [ "select_next" ];
211+
"<S-Tab>" = [ "select_prev" ];
139212
};
140213
};
141214

0 commit comments

Comments
 (0)