Skip to content
Closed

Agents #1936

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
834e294
Updating kickstart config with some of my custom needs, updating comm…
Juanito87 Apr 21, 2024
9ef80b2
Separating plugin manager instalation from configuration
Juanito87 Apr 21, 2024
ede599b
Renaming files, moving to modular config.
Juanito87 Apr 23, 2024
199d8fa
Updating plugins config
Juanito87 Apr 23, 2024
7edfc14
Moving plugins to multi file config
Juanito87 Apr 23, 2024
9943508
UPD.
Juanito87 Apr 23, 2024
9480380
Fixing harpoon
Juanito87 Apr 23, 2024
c3174bf
Moved default configs not instaled to a diasble folder.
Juanito87 Apr 23, 2024
5d6f902
Updating config file
Juanito87 Apr 23, 2024
9d70e6d
removing comments
Juanito87 Apr 23, 2024
0b1d7f8
Removing duplicated files
Juanito87 Apr 23, 2024
ea21f35
UPD
Juanito87 Apr 24, 2024
9ce4a5c
Adding copilot
Juanito87 Jul 1, 2024
b701451
Updating whic-key config
Juanito87 Apr 14, 2025
06f2898
Updating code_runner config
Juanito87 Apr 14, 2025
b860612
Fixing typo
Juanito87 Apr 15, 2025
e5a05cf
Updating config, enabling more plugins, sort deprecation warnings
Juanito87 Apr 26, 2025
99f1e6f
Solving merge conflicts
Juanito87 Apr 26, 2025
3a2f17c
UPD
Juanito87 Apr 26, 2025
46a6fcf
final fixes
Juanito87 Apr 26, 2025
25148b1
test
Juanito87 May 11, 2025
8ad2208
Fix typos.
Juanito87 May 12, 2025
6fdd103
Merge branch 'master' into main
Juanito87 Jul 12, 2025
9c6e9e2
Merge pull request #2 from Juanito87/main
Juanito87 Jul 12, 2025
5cffa31
Updating from upstream
Juanito87 Jul 12, 2025
1146179
Updating config
Juanito87 Jul 12, 2025
0677b65
Fixes
Juanito87 Jul 12, 2025
f35803e
More fixes.
Juanito87 Jul 12, 2025
b61a68c
UPD
Juanito87 Jul 12, 2025
32e75b6
Update lsp.lua
Juanito87 Sep 17, 2025
b27e345
Update lsp.lua
Juanito87 Sep 18, 2025
ae8377b
Update lsp.lua
Juanito87 Sep 18, 2025
088e844
Update lsp.lua
Juanito87 Sep 18, 2025
42d4666
Update lsp.lua
Juanito87 Sep 18, 2025
9ca65a5
Update lsp.lua
Juanito87 Sep 18, 2025
dbb1ee7
Update lsp.lua
Juanito87 Sep 18, 2025
34dbd47
Updating from upstream
Juanito87 Feb 21, 2026
8bcf19e
Merge pull request #5 from Juanito87/update
Juanito87 Feb 21, 2026
adf5f79
UPD
Juanito87 Mar 9, 2026
f0584e2
Merge pull request #6 from Juanito87/opencode
Juanito87 Mar 9, 2026
f640f80
Add AGENTS.md development guide for AI coding agents
Juanito87 Mar 9, 2026
218aa14
Merge pull request #7 from Juanito87/add-agents-md
Juanito87 Mar 9, 2026
cde327c
docs: streamline AGENTS.md for AI coding agents
Juanito87 Mar 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
147 changes: 147 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
# AGENTS.md - Development Guide for AI Coding Agents

This file provides essential information for AI coding agents working in this Neovim configuration repository. It covers build/lint/test commands, code style guidelines, and project conventions.

## Build/Lint/Test Commands

### Linting
- **Command**: `:lua require('lint').try_lint()`
- **Description**: Run linting on current buffer using nvim-lint plugin
- **File types**: Currently configured for markdown files with `markdownlint`
- **Manual command**: `markdownlint-cli file.md` (if available globally)
- **CI**: GitHub Actions runs stylua formatting checks

### Formatting
- **Command**: `:lua require('conform').format({ async = true, lsp_format = 'fallback' })`
- **Keybinding**: `<leader>f` (normal/visual mode)
- **Formatters by filetype**: Lua: `stylua`, Python: `isort`/`black`, JavaScript: `prettier`, Go: `gofmt`, Rust: `rustfmt`, YAML: `yamlfix`, TOML: `taplo`, Terraform: `terraform_fmt`, Markdown: `markdownlint`

### Testing
- **Status**: No automated testing framework configured
- **Manual testing**: `:checkhealth` for Neovim health checks, `:Lazy` for plugin status
- **Single test execution**: N/A - use `:checkhealth` for comprehensive checks

## Code Style Guidelines

### Formatting (.stylua.toml)
- Column width: 160 characters, indent: 2 spaces, quote style: auto-prefer single quotes
- Call parentheses: omit when possible, simple statements: always collapse

### Imports & Naming
```lua
-- Standard require pattern
local module = require('module.name')

-- Conditional requires with error handling
local ok, plugin = pcall(require, 'optional.plugin')
if not ok then vim.notify('Plugin failed: ' .. result, vim.log.levels.WARN) end
```
- **Variables/Functions**: `camelCase` (e.g., `local bufferNumber = 1`, `function setupLsp() end`)
- **Constants**: `UPPER_SNAKE_CASE` (e.g., `local MAX_RETRIES = 3`)
- **Modules**: `snake_case` for file names
- **Descriptive names**: Prefer clarity over brevity

### Error Handling & Comments
```lua
-- Safe plugin loading
local ok, result = pcall(require, 'plugin.name')
if not ok then
vim.notify('Plugin failed to load: ' .. result, vim.log.levels.WARN)
return
end
```
```lua
-- Single line comments, TODO/FIXME/NOTE
-- EmmyLua annotations: ---@param name type: description
---@param buffer number: The buffer number
---@return boolean: Success status
```

### Function & Table Style
```lua
-- Anonymous functions for keymaps
vim.keymap.set('n', '<leader>key', function() end, { desc = 'Description' })

-- Named functions for complex logic
local function setupPlugin() end

-- Consistent table formatting
local config = {
option1 = true,
nested = { setting = 42 },
timeout_ms = 500, -- Align when readable
}
```

### Autocommands & Keymaps
```lua
-- Use descriptive augroup names
local augroup = vim.api.nvim_create_augroup('plugin-name-feature', { clear = true })
vim.api.nvim_create_autocmd('FileType', {
group = augroup,
pattern = 'lua',
callback = function() end,
})
```
```lua
-- Always include descriptions
vim.keymap.set('n', '<leader>sh', builtin.help_tags, { desc = '[S]earch [H]elp' })
-- Use leader key (<space>), group related mappings under prefixes
```

## Project Conventions

### File Organization
```
lua/
├── options.lua # Vim options and settings
├── keymaps.lua # Keybindings
├── autocommands.lua # Autocommands
├── lazy-config.lua # Lazy plugin manager setup
├── plugins_config/ # Plugin-specific configurations
└── custom/ # User customizations
```

### Plugin Management
- **Manager**: lazy.nvim
- **Commands**: `:Lazy` (status), `:Lazy update`, `:Lazy clean`, `:Lazy profile`

### Commit Messages
- Follow conventional commit format
- Be descriptive about Neovim-specific changes and plugin references

### Plugin Configuration Pattern
```lua
return {
'author/plugin-name',
event = 'VimEnter', -- Lazy loading trigger
dependencies = { 'dep1', 'dep2' },
opts = { setting = value }, -- Simple options
config = function() -- Complex setup
local plugin = require('plugin')
plugin.setup({ config })
end,
keys = { -- Keybindings
{ '<leader>key', function() end, desc = 'Description' },
},
}
```

## Development Workflow

1. **Setup**: Clone repository and start Neovim
2. **Plugin management**: Use `:Lazy` commands
3. **Testing**: `:checkhealth`, `:Lazy`, manual testing
4. **Formatting**: `<leader>f` or conform commands
5. **Linting**: Use lint commands for supported file types
6. **Git workflow**: Standard branching, commit, and PR process

## Neovim-Specific Considerations

- **API usage**: Prefer `vim.api.nvim_*` over deprecated `vim.*`
- **Version compatibility**: Target latest stable Neovim
- **Plugin compatibility**: Check lazy-lock.json for pinned versions
- **Performance**: Mindful of startup time and memory usage
- **User experience**: Consider mouse and keyboard workflows

This guide ensures AI agents can contribute effectively while maintaining consistency with existing patterns and conventions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ A starting point for Neovim that is:
* Single-file
* Completely Documented


**NOT** a Neovim distribution, but instead a starting point for your configuration.

## Installation
Expand Down
Loading
Loading