|
3 | 3 | local M = {} |
4 | 4 |
|
5 | 5 | function M.check() |
6 | | - local health = vim.health |
7 | | - |
8 | | - health.start("Arizona Framework") |
9 | | - |
10 | | - -- Core feature: Filetype detection (always works) |
11 | | - if vim.filetype.match({ filename = "test.herl" }) == "arizona" then |
12 | | - health.ok("Filetype detection working (.herl → arizona)") |
13 | | - else |
14 | | - health.error("Filetype detection broken") |
15 | | - end |
16 | | - |
17 | | - -- Feature: Tree-sitter parser |
18 | | - local ts_ok, parsers = pcall(require, "nvim-treesitter.parsers") |
19 | | - if ts_ok then |
20 | | - if parsers.get_parser_configs().arizona then |
21 | | - health.ok("Tree-sitter parser configured") |
22 | | - else |
23 | | - health.error("Tree-sitter parser not configured") |
24 | | - end |
25 | | - else |
26 | | - health.warn("nvim-treesitter not available") |
27 | | - end |
28 | | - |
29 | | - -- Feature: Language injection |
30 | | - if pcall(require, "otter") then |
31 | | - health.ok("Language injection available (otter.nvim found)") |
32 | | - else |
33 | | - health.warn("Language injection unavailable (install otter.nvim)") |
34 | | - end |
35 | | - |
36 | | - -- Current buffer status |
37 | | - local current_ft = vim.bo.filetype |
38 | | - if current_ft == "arizona" then |
39 | | - health.start("Current Buffer") |
40 | | - health.ok("Current buffer is Arizona template file") |
41 | | - end |
| 6 | + local health = vim.health |
| 7 | + |
| 8 | + health.start("Arizona Framework") |
| 9 | + |
| 10 | + -- Core feature: Filetype detection (always works) |
| 11 | + if vim.filetype.match({ filename = "test.herl" }) == "arizona" then |
| 12 | + health.ok("Filetype detection working (.herl → arizona)") |
| 13 | + else |
| 14 | + health.error("Filetype detection broken") |
| 15 | + end |
| 16 | + |
| 17 | + -- Feature: Tree-sitter parser |
| 18 | + local ts_ok, parsers = pcall(require, "nvim-treesitter.parsers") |
| 19 | + if ts_ok then |
| 20 | + if parsers.get_parser_configs().arizona then |
| 21 | + health.ok("Tree-sitter parser configured") |
| 22 | + |
| 23 | + -- Check if parser is actually installed |
| 24 | + local parser_ok = |
| 25 | + pcall(vim.treesitter.get_parser, vim.api.nvim_create_buf(false, true), "arizona") |
| 26 | + if parser_ok then |
| 27 | + health.ok("Arizona parser installed and working") |
| 28 | + else |
| 29 | + health.warn("Arizona parser configured but not installed - run :TSInstall arizona") |
| 30 | + end |
| 31 | + else |
| 32 | + health.error("Tree-sitter parser not configured") |
| 33 | + end |
| 34 | + else |
| 35 | + health.warn("nvim-treesitter not available") |
| 36 | + end |
| 37 | + |
| 38 | + -- Feature: Language injection |
| 39 | + if pcall(require, "otter") then |
| 40 | + health.ok("Language injection available (otter.nvim found)") |
| 41 | + else |
| 42 | + health.warn("Language injection unavailable (install otter.nvim)") |
| 43 | + end |
| 44 | + |
| 45 | + -- Current buffer status |
| 46 | + local current_ft = vim.bo.filetype |
| 47 | + if current_ft == "arizona" then |
| 48 | + health.start("Current Buffer") |
| 49 | + health.ok("Current buffer is Arizona template file") |
| 50 | + end |
42 | 51 | end |
43 | 52 |
|
44 | 53 | return M |
45 | | - |
|
0 commit comments