Skip to content

Commit a0214ea

Browse files
fix neotest latest (#15)
* Upgrade neotest Go adapter to fredrikaverpil/neotest-golang with version specification This revolutionary upgrade to our Neovim testing infrastructure represents a quantum leap forward in Go language testing capabilities within our editor environment. The transition from the generic 'nvim-neotest/neotest-go' dependency to the specialized 'fredrikaverpil/neotest-golang' adapter introduces a new era of testing precision and feature richness. Key enhancements include: - Migration from basic neotest-go to the more advanced fredrikaverpil/neotest-golang adapter - Introduction of explicit version specification with 'version = "*"' for optimal release tracking - Preservation of existing adapter ecosystem including neotest-rust and commented zig/bun adapters - Maintenance of dependency structure while upgrading core Go testing functionality The implementation occurs at lines 4-7 of the neotest-plugin.lua file, where the dependencies table undergoes this strategic transformation. The new adapter provides enhanced Go testing features, better integration with modern Go development practices, and improved test discovery and execution capabilities. This change ensures that our Neovim configuration remains at the forefront of testing technology, providing developers with cutting-edge tools for comprehensive test management and execution within their preferred editor environment. * Uncomment the neotest-zig dependency in the neotest plugin configuration This commit meticulously removes the comment markers from the line specifying the 'lawrence-laz/neotest-zig' dependency within the dependencies table of the neotest plugin setup. By uncommenting this line, the Zig testing adapter for neotest is now included in the plugin's dependency list, allowing for Zig language test execution capabilities to be integrated into the Neovim testing framework. The change involves precisely altering the syntax from a commented-out state to an active dependency, ensuring that the plugin can load and utilize the Zig adapter when configured in the adapters section. This modification is part of a broader effort to expand the testing support across multiple programming languages within the neotest ecosystem, specifically targeting Zig projects that require automated testing workflows directly from within the editor environment. * Introduce build function to install gotestsum for enhanced Go testing capabilities This commit introduces a build function within the neotest plugin configuration that automates the installation of gotestsum, a Go test runner that provides improved output formatting and test result aggregation. The build function utilizes vim.system to execute the 'go install' command for 'gotest.tools/gotestsum@latest', ensuring the latest version is fetched and installed during the plugin setup process. This enhancement is particularly beneficial for Go developers using neotest, as gotestsum offers features like parallel test execution, JUnit XML output, and better integration with CI/CD pipelines. By incorporating this build step, the plugin now proactively prepares the necessary tooling for optimal Go test execution, reducing manual setup requirements and improving the overall developer experience when working with Go projects in Neovim. The function waits for the installation to complete, guaranteeing that the tool is available before the plugin initialization proceeds. * Activate neotest-bun dependency for Bun runtime testing support This commit removes the comment prefix from the 'arthur944/neotest-bun' dependency entry in the neotest plugin dependencies list, thereby enabling support for testing JavaScript and TypeScript code using the Bun runtime within the neotest framework. Bun is a fast, modern JavaScript runtime that offers significant performance improvements over traditional Node.js for certain workloads, and this adapter allows developers to run their Bun-based tests directly from Neovim using neotest's interface. By uncommenting this line, the plugin will now load the neotest-bun adapter, which integrates with Bun's test runner to provide features like test discovery, execution, and result reporting. This change expands the plugin's language support to include projects utilizing Bun, catering to developers who prefer this runtime for its speed and developer experience enhancements, while maintaining compatibility with existing neotest workflows and keybindings. * Enable neotest-playwright adapter for end-to-end testing with Playwright This commit uncomments the 'thenbe/neotest-playwright' dependency, integrating Playwright support into the neotest testing framework for comprehensive end-to-end testing capabilities. Playwright is a powerful automation library for testing web applications across multiple browsers, and this adapter allows running Playwright tests seamlessly within Neovim's neotest interface. By activating this dependency, developers can now execute browser-based tests, including those for user interactions, API calls, and visual regressions, directly from their editor. The adapter supports advanced Playwright features like test isolation, parallel execution, and cross-browser testing, making it invaluable for full-stack web development projects. This enhancement bridges the gap between unit testing and end-to-end testing within the same unified testing workflow, improving productivity for teams working on complex web applications that require thorough UI and API testing. * Uncomment and activate Zig, Playwright, and Bun adapters in neotest configuration This commit removes the comment markers from the adapter configurations for neotest-zig, neotest-playwright, and neotest-bun within the opts.adapters table, effectively enabling these testing adapters for their respective languages and frameworks. For the Zig adapter, it configures the DAP (Debug Adapter Protocol) to use the LLDB debugger, allowing for integrated debugging of Zig tests directly within Neovim. The Playwright adapter is set up with options to persist project selection across sessions and enable dynamic test discovery, which automatically finds and registers new test files as they are created. The Bun adapter is activated with default settings, providing basic test execution capabilities for JavaScript/TypeScript projects using the Bun runtime. This comprehensive activation expands the neotest plugin's capabilities to support a wider range of programming languages and testing scenarios, including systems programming with Zig, end-to-end web testing with Playwright, and fast JavaScript testing with Bun, all while maintaining consistent integration with Neovim's debugging and testing workflows. * Migrate from neotest-go to neotest-golang adapter with gotestsum runner This commit performs a significant update to the Go testing adapter configuration by replacing the deprecated 'neotest-go' adapter with the newer 'fredrikaverpil/neotest-golang' adapter, which offers improved compatibility and features for modern Go development. The adapter key is changed from 'neotest-go' to 'neotest-golang' to match the updated plugin naming convention. The runner is switched from the basic 'go test' command to 'gotestsum', which provides enhanced test output formatting, parallel execution capabilities, and better integration with CI/CD systems through features like JUnit XML output and test result summarization. The previous experimental test_table configuration and custom args for test count, timeout, and verbosity are removed in favor of gotestsum's default, more robust handling of these aspects. This migration ensures that Go tests run with improved performance, better error reporting, and more reliable execution, particularly beneficial for large Go codebases and projects requiring comprehensive test reporting. * added blink-dictionary * latest * latest * latest * Update neovim configuration for neotest fixes - Modify dictionary/markdown-claude.dict - Update lua/plugins/lspconfig-plugin.lua - Add new lua/plugins/tiny-code-action-plugin.lua * latest * Configure tailwindcss LSP for templ filetype support Add configuration to tailwindcss LSP server to support the 'templ' filetype by mapping it to 'html' language. This enables proper Tailwind CSS IntelliSense, autocomplete, and syntax highlighting when working with .templ files in Neovim, improving the development experience for projects using the templ template engine with Tailwind CSS styling.
1 parent 1e6bcea commit a0214ea

File tree

12 files changed

+722
-66
lines changed

12 files changed

+722
-66
lines changed

.claude/commands/spectr/apply.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
description: Implement an approved Spectr change and keep tasks in sync.
3+
---
4+
5+
<!-- spectr:START -->
6+
7+
**Guardrails**
8+
- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
9+
- Keep changes tightly scoped to the requested outcome.
10+
- Refer to `spectr/AGENTS.md` (located inside the `spectr/` directory—run `ls spectr` or `spectr init` if you don't see it) if you need additional Spectr conventions or clarifications.
11+
12+
**Steps**
13+
Track these steps as TODOs and complete them one by one.
14+
1. Read `spectr/changes/<id>/proposal.md`, `design.md` (if present), and `tasks.md` to confirm scope and acceptance criteria.
15+
2. Work through tasks sequentially, keeping edits minimal and focused on the requested change.
16+
3. Confirm completion before updating statuses—make sure every item in `tasks.md` is finished.
17+
4. Update the checklist after all work is done so each task is marked `- [x]` and reflects reality.
18+
5. Reference `spectr list` when additional context is required.
19+
20+
**Reference**
21+
- Read `spectr/changes/<id>/proposal.md` for proposal details.
22+
- Read `spectr/changes/<id>/specs/<capability>/spec.md` for delta specs.
23+
24+
25+
<!-- spectr:END -->
26+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
description: Scaffold a new Spectr change and validate strictly.
3+
---
4+
5+
<!-- spectr:START -->
6+
7+
**Guardrails**
8+
- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
9+
- Keep changes tightly scoped to the requested outcome.
10+
- Refer to `spectr/AGENTS.md` (located inside the `spectr/` directory—run `ls spectr` or `spectr init` if you don't see it) if you need additional Spectr conventions or clarifications.
11+
- Identify any vague or ambiguous details and ask the necessary follow-up questions before editing files.
12+
13+
**Steps**
14+
1. Review `spectr/project.md`, run `spectr list` and `spectr list --specs`, and inspect related code or docs (e.g., via `rg`/`ls`) to ground the proposal in current behaviour; note any gaps that require clarification.
15+
2. Choose a unique verb-led `change-id` and scaffold `proposal.md`, `tasks.md`, and `design.md` (when needed) under `spectr/changes/<id>/`.
16+
3. Map the change into concrete capabilities or requirements, breaking multi-scope efforts into distinct spec deltas with clear relationships and sequencing.
17+
4. Capture architectural reasoning in `design.md` when the solution spans multiple systems, introduces new patterns, or demands trade-off discussion before committing to specs.
18+
5. Draft spec deltas in `spectr/changes/<id>/specs/<capability>/spec.md` (one folder per capability) using `## ADDED|MODIFIED|REMOVED Requirements` with at least one `#### Scenario:` per requirement and cross-reference related capabilities when relevant.
19+
6. Draft `tasks.md` as an ordered list of small, verifiable work items that deliver user-visible progress, include validation (tests, tooling), and highlight dependencies or parallelizable work.
20+
7. Validate with `spectr validate <id> --strict` and resolve every issue before sharing the proposal.
21+
22+
**Reference**
23+
- Read delta specs directly at `spectr/changes/<id>/specs/<capability>/spec.md` when validation fails.
24+
- Read existing specs at `spectr/specs/<capability>/spec.md` to understand current state.
25+
- Search existing requirements with `rg -n "Requirement:|Scenario:" spectr/specs` before writing new ones.
26+
- Explore the codebase with `rg <keyword>`, `ls`, or direct file reads so proposals align with current implementation realities.
27+
28+
29+
<!-- spectr:END -->
30+

.claude/commands/spectr/sync.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
description: Detect spec drift from code and update specs interactively.
3+
---
4+
5+
<!-- spectr:START -->
6+
7+
### Guardrails
8+
- Code is the source of truth—specs should reflect actual implementation.
9+
- Only update specs after user confirms each change.
10+
- Keep spec updates minimal and focused on actual drift.
11+
- Create missing specs for new capabilities supported by the implementation.
12+
- Refer to `spectr/AGENTS.md` for Spectr conventions.
13+
14+
### Steps
15+
1. Determine scope:
16+
- If arguments specify capabilities (e.g., `<Capabilities>auth, cli</Capabilities>`), focus on those.
17+
- Otherwise, ask the user which capabilities to sync, or analyze recent git changes to suggest candidates.
18+
19+
2. Load current specs:
20+
- Run `spectr list --specs` to enumerate capabilities.
21+
- Read each relevant `spectr/specs/<capability>/spec.md`.
22+
23+
3. Analyze implementation:
24+
- For each capability, identify related code (by directory name, imports, or user guidance).
25+
- Read the implementation and understand actual behavior.
26+
27+
4. Detect drift:
28+
- Compare code behavior against spec requirements and scenarios.
29+
- Identify: new features (to be ADDED), changed behavior (to be MODIFIED), removed features (to be REMOVED).
30+
31+
5. Interactive review:
32+
- For each drift item, present: the requirement, what code does, and proposed spec change.
33+
- Ask user to confirm, modify, or skip each change.
34+
35+
6. Apply updates:
36+
- Edit specs directly with confirmed changes.
37+
- Run `spectr validate --strict` to ensure validity.
38+
- Show summary of changes made.
39+
40+
### Reference
41+
- Read `spectr/specs/<capability>/spec.md` to view current spec content.
42+
- Search code with `rg` to find implementations.
43+
- Validate after edits with `spectr validate --strict`.
44+
45+
46+
<!-- spectr:END -->
47+

CLAUDE.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!-- spectr:START -->
2+
# Spectr Instructions
3+
4+
These instructions are for AI assistants working in this project.
5+
6+
Always open `@/spectr/AGENTS.md` when the request:
7+
- Mentions planning or proposals (words like proposal, spec, change, plan)
8+
- Introduces new capabilities, breaking changes, architecture shifts, or big performance/security work
9+
- Sounds ambiguous and you need the authoritative spec before coding
10+
11+
Use `@/spectr/AGENTS.md` to learn:
12+
- How to create and apply change proposals
13+
- Spec format and conventions
14+
- Project structure and guidelines
15+
16+
<!-- spectr:END -->

dictionary/markdown-claude.dict

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
/openspec:proposal
2-
/openspec:apply
3-
/openspec:archive
1+
/spectr:proposal
2+
/spectr:apply
3+
/spectr:archive
4+
ULTRATHINK

lua/plugins/big-file-plugin.lua

Lines changed: 0 additions & 20 deletions
This file was deleted.

lua/plugins/lspconfig-plugin.lua

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ return {
2929
servers = {
3030
-- phpactor = {},
3131
-- volar = {},
32+
svelte_ls = {},
3233
vue_ls = {},
3334
-- harper_ls = {
3435
-- settings = {
@@ -110,7 +111,16 @@ return {
110111
rust_analyzer = {},
111112
texlab = {},
112113
vhdl_ls = {},
113-
tailwindcss = {},
114+
tailwindcss = {
115+
filetypes = { "templ", "astro", "javascript", "typescript", "react" },
116+
settings = {
117+
tailwindCSS = {
118+
includeLanguages = {
119+
templ = "html",
120+
},
121+
},
122+
},
123+
},
114124
hdl_checker = {},
115125
jsonls = {},
116126
yamlls = {},
@@ -187,12 +197,15 @@ return {
187197
vim.lsp.buf.format,
188198
{ buffer = args.buf, desc = '[C]ode [F]ormat' }
189199
)
190-
vim.keymap.set(
191-
'n',
192-
'<leader>ca',
193-
vim.lsp.buf.code_action,
194-
{ buffer = args.buf, desc = '[C]ode [A]ction' }
195-
)
200+
-- vim.keymap.set(
201+
-- 'n',
202+
-- '<leader>ca',
203+
-- vim.lsp.buf.code_action,
204+
-- { buffer = args.buf, desc = '[C]ode [A]ction' }
205+
-- )
206+
vim.keymap.set({ "n", "x" }, "<leader>ca", function()
207+
require("tiny-code-action").code_action()
208+
end, { noremap = true, silent = true })
196209
vim.keymap.set(
197210
'n',
198211
'<leader>ls',

lua/plugins/telescope-plugin.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
return {
22
'nvim-telescope/telescope.nvim',
3-
-- tag = '0.1.9',
4-
ref = '84b9ba066d1860f7a586ce9cd732fd6c4f77d1d9',
3+
tag = 'v0.2.0',
54
event = 'BufWinEnter',
65
dependencies = {
76
'nvim-telescope/telescope-media-files.nvim',
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
return {
2+
"rachartier/tiny-code-action.nvim",
3+
dependencies = {
4+
{ "nvim-lua/plenary.nvim" },
5+
6+
-- optional picker via telescope
7+
{ "nvim-telescope/telescope.nvim" },
8+
-- optional picker via fzf-lua
9+
{ "ibhagwan/fzf-lua" },
10+
-- .. or via snacks
11+
{
12+
"folke/snacks.nvim",
13+
opts = {
14+
terminal = {},
15+
}
16+
}
17+
},
18+
event = "LspAttach",
19+
opts = {
20+
picker = "buffer",
21+
},
22+
}

lua/plugins/tree-sitter-plugin.lua

Lines changed: 42 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
return {
22
"nvim-treesitter/nvim-treesitter",
33
version = false,
4-
branch = "main",
4+
-- branch = "main",
5+
rev = "00c906abb9550e72bc0c640545b5499b9525bb40",
56
build = ":TSUpdate",
67
event = { "BufReadPost", "BufNewFile" },
78
dependencies = {
@@ -16,41 +17,37 @@ return {
1617
vim.g.load_textobjects = true
1718
end,
1819
},
19-
-- {
20-
-- "nvim-treesitter/nvim-treesitter-context",
21-
-- config = function()
22-
-- require("treesitter-context").setup {
23-
-- -- Enable this plugin (Can be enabled/disabled later via commands)
24-
-- enable = true,
25-
-- -- Enable multiwindow support.
26-
-- multiwindow = false,
27-
-- -- How many lines the window should span. Values <= 0 mean no limit.
28-
-- max_lines = 8,
29-
-- -- Minimum editor window height to enable context. Values <= 0 mean no limit.
30-
-- min_window_height = 0,
31-
-- line_numbers = true,
32-
-- -- Maximum number of lines to show for a single context
33-
-- multiline_threshold = 20,
34-
-- -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer'
35-
-- trim_scope = 'outer',
36-
-- mode = 'cursor', -- Line used to calculate context. Choices: 'cursor', 'topline'
37-
-- -- Separator between context and content. Should be a single character string, like '-'.
38-
-- -- When separator is set, the context will only show up when there are at least 2 lines above cursorline.
39-
-- separator = nil,
40-
-- -- The Z-index of the context window
41-
-- zindex = 20,
42-
-- -- (fun(buf: integer): boolean) return false to disable attaching
43-
-- on_attach = nil,
44-
-- }
45-
-- end,
46-
-- },
20+
{
21+
"nvim-treesitter/nvim-treesitter-context",
22+
config = function()
23+
require("treesitter-context").setup {
24+
-- Enable this plugin (Can be enabled/disabled later via commands)
25+
enable = true,
26+
-- Enable multiwindow support.
27+
multiwindow = false,
28+
-- How many lines the window should span. Values <= 0 mean no limit.
29+
max_lines = 8,
30+
-- Minimum editor window height to enable context. Values <= 0 mean no limit.
31+
min_window_height = 0,
32+
line_numbers = true,
33+
-- Maximum number of lines to show for a single context
34+
multiline_threshold = 20,
35+
-- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer'
36+
trim_scope = 'outer',
37+
mode = 'cursor', -- Line used to calculate context. Choices: 'cursor', 'topline'
38+
-- Separator between context and content. Should be a single character string, like '-'.
39+
-- When separator is set, the context will only show up when there are at least 2 lines above cursorline.
40+
separator = nil,
41+
-- The Z-index of the context window
42+
zindex = 20,
43+
-- (fun(buf: integer): boolean) return false to disable attaching
44+
on_attach = nil,
45+
}
46+
end,
47+
},
4748
-- { 'nvim-treesitter/playground' }
4849
},
4950
cmd = { "TSUpdateSync" },
50-
keys = {
51-
{ "<c-space>", desc = "Increment selection" },
52-
{ "<bs>", desc = "Decrement selection", mode = "x" },
53-
},
5451
opts = {
5552
auto_install = true,
5653
ensure_installed = {
@@ -115,7 +112,18 @@ return {
115112
},
116113
highlight = {
117114
enable = true,
118-
additional_vim_regex_highlighting = { "markdown" },
115+
disable = function(lang, buf)
116+
if lang == "rustsdf" then
117+
return true
118+
end
119+
local max_filesize = 100 * 1024 -- 100 KB
120+
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
121+
if ok and stats and stats.size > max_filesize then
122+
return true
123+
end
124+
end,
125+
-- additional_vim_regex_highlighting = { "markdown" },
126+
additional_vim_regex_highlighting = false,
119127
},
120128
indent = {
121129
enable = true,

0 commit comments

Comments
 (0)