Compare commits

...

15 Commits

Author SHA1 Message Date
Ducky SSH User
a515f65f7d Update the location for nvim-treesitter.config 2025-12-25 22:31:39 +10:00
Ducky SSH User
7b0cdd0b2d Opencode Init 2025-12-07 22:59:51 +00:00
Ducky SSH User
abfadff35e Enable Copilot suggestions and panel 2025-12-07 22:59:37 +00:00
Ducky SSH User
736a2699b9 Add ansible filetype so that LSP works correctly 2025-12-07 22:59:28 +00:00
Ducky SSH User
73bb97ed1d Change the default shell for ToggleTerm back to bash 2025-12-07 03:57:01 +00:00
Ducky SSH User
897d1e8d7b Disable warnings and mcp-hub 2025-12-06 08:07:02 +00:00
a8245b6783 Remap harpoon buffer list to stop interference with debugger 2025-05-12 22:22:21 +10:00
e1390e2101 Install and configure vim-go 2025-05-12 22:04:49 +10:00
e324019a1c Resize how large terminals open, new keymaps and <ESC> keymap for exiting terminal mode 2025-05-12 21:57:51 +10:00
37aba09336 Setup copilot, code-companion, mcp-hub and noice 2025-05-12 21:27:24 +10:00
fd0db7d448 Add lazygit keymap 2025-01-01 20:12:15 +10:00
1459ea94bf Enable default plugins, add toggleterm, harpoon and lazygit 2025-01-01 20:09:16 +10:00
Ryan Jensen
a8f539562a Fix which-key delay settings (#1276)
The which-key plugin used to rely on vim.opt.timeoutlen, but it was
updated a few months ago to use its own opt.delay instead.

8ab96b38a2/NEWS.md (L10)

I set which-key's delay to 0 ms because it makes it feel snappy and
responsive! That way, we give new users a good first impression.
2024-12-29 12:04:10 -05:00
Ihsan Tonuzi
7ddaab3ffd chore: add pre-issue requirements (#1288)
* chore: add pre-issue requirements

Based on #1285

* docs: add header about documentation

Based on #1285
2024-12-29 12:00:16 -05:00
George
e84e187f3c Fix README.md grammar and typos (#1291) 2024-12-29 11:39:47 -05:00
16 changed files with 329 additions and 24 deletions

View File

@@ -9,6 +9,13 @@ assignees: ''
<!-- Any bug report not following this template will be immediately closed. Thanks -->
## Before Reporting an Issue
- I have read the kickstart.nvim README.md.
- I have read the appropiate plugin's documentation.
- I have searched that this issue has not been reported before.
- [ ] **By checking this, I confirm that the above steps are completed. I understand leaving this unchecked will result in this report being closed immediately.**
## Describe the bug
<!-- A clear and concise description of what the bug is. -->
@@ -18,8 +25,8 @@ assignees: ''
## Desktop
<!-- please complete the following information. -->
- OS:
- Terminal:
- OS:
- Terminal:
## Neovim Version
<!-- Output of running `:version` from inside of neovim. -->

57
AGENTS.md Normal file
View File

@@ -0,0 +1,57 @@
# AGENTS.md - Neovim Configuration Guide
## Overview
This is a kickstart.nvim fork - a modular Neovim configuration written in Lua. Code is organized in:
- `/init.lua` - Main entry point (kept concise for learning)
- `/lua/custom/` - User custom configurations and plugins
- `/lua/kickstart/` - Core plugin configurations
## Code Style Guidelines
### Lua Formatting
- **Formatter**: Stylua (enforced via CI)
- **Config**: `.stylua.toml` (column_width=160, indent=2 spaces, auto quote style)
- **Command**: `stylua .` to format all files, `stylua --check .` to verify
### Code Conventions
- **Imports**: Use `require()` to load modules; prefer relative paths from `/lua/`
- **Comments**: Use `--` for single-line, `--[[` for block comments; include URLs for plugins
- **Naming**: snake_case for variables/functions, PascalCase for classes
- **Lua tables**: Preferred data structure; use clear key names
- **Error handling**: Use `pcall()` for risky operations; fail gracefully with fallbacks
### Plugin Structure
- Each plugin is a separate file returning a table with name, dependencies, config
- Use `event`, `cmd`, `ft` keys for lazy-loading optimization
- Config functions should be self-contained and well-commented
## Build/Lint/Test Commands
### Format & Lint
```bash
# Format all Lua files
stylua .
# Check formatting without changing files
stylua --check .
# Format specific file
stylua path/to/file.lua
```
### No traditional tests
This is a configuration repo, not a testable library. Validation is manual:
- Start Neovim: `nvim`
- Check `:Lazy` status for plugin errors
- Review `:checkhealth` for configuration issues
- Test manually in editor to verify keymaps/features work
### Linting
- Neovim's built-in Lua LSP provides type checking (integrated via plugin)
- The GitHub Actions workflow runs `stylua --check` on PRs
## Key Notes
- **Language**: Lua 5.1+ (Neovim's version)
- **No external build process**: Configuration is interpreted at runtime
- **Plugin manager**: Lazy.nvim (auto-installs missing plugins on startup)
- **Target**: Latest Neovim stable + nightly versions

View File

@@ -1,5 +1,7 @@
# kickstart.nvim
This fork of kickstart.nvim has a few plugins added and is used a general base though just cloning it will get you 90% of the way through most of your development in various languages.
## Introduction
A starting point for Neovim that is:
@@ -24,7 +26,7 @@ If you are experiencing issues, please make sure you have the latest versions.
External Requirements:
- Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`)
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation)
- Clipboard tool (xclip/xsel/win32yank or other depending on platform)
- Clipboard tool (xclip/xsel/win32yank or other depending on the platform)
- A [Nerd Font](https://www.nerdfonts.com/): optional, provides various icons
- if you have it set `vim.g.have_nerd_font` in `init.lua` to true
- Language Setup:
@@ -56,12 +58,12 @@ so that you have your own copy that you can modify, then install by cloning the
fork to your machine using one of the commands below, depending on your OS.
> **NOTE**
> Your fork's url will be something like this:
> Your fork's URL will be something like this:
> `https://github.com/<your_github_username>/kickstart.nvim.git`
You likely want to remove `lazy-lock.json` from your fork's `.gitignore` file
too - it's ignored in the kickstart repo to make maintenance easier, but it's
[recommmended to track it in version control](https://lazy.folke.io/usage/lockfile).
[recommended to track it in version control](https://lazy.folke.io/usage/lockfile).
#### Clone kickstart.nvim
> **NOTE**
@@ -101,12 +103,17 @@ nvim
```
That's it! Lazy will install all the plugins you have. Use `:Lazy` to view
current plugin status. Hit `q` to close the window.
the current plugin status. Hit `q` to close the window.
#### Read The Friendly Documentation
Read through the `init.lua` file in your configuration folder for more
information about extending and exploring Neovim. That also includes
examples of adding popularly requested plugins.
> [!NOTE]
> For more information about a particular plugin check its repository's documentation.
### Getting Started
@@ -114,9 +121,9 @@ examples of adding popularly requested plugins.
### FAQ
* What should I do if I already have a pre-existing neovim configuration?
* What should I do if I already have a pre-existing Neovim configuration?
* You should back it up and then delete all associated files.
* This includes your existing init.lua and the neovim files in `~/.local`
* This includes your existing init.lua and the Neovim files in `~/.local`
which can be deleted with `rm -rf ~/.local/share/nvim/`
* Can I keep my existing configuration in parallel to kickstart?
* Yes! You can use [NVIM_APPNAME](https://neovim.io/doc/user/starting.html#%24NVIM_APPNAME)`=nvim-NAME`
@@ -135,7 +142,7 @@ examples of adding popularly requested plugins.
* The main purpose of kickstart is to serve as a teaching tool and a reference
configuration that someone can easily use to `git clone` as a basis for their own.
As you progress in learning Neovim and Lua, you might consider splitting `init.lua`
into smaller parts. A fork of kickstart that does this while maintaining the
into smaller parts. A fork of kickstart that does this while maintaining the
same functionality is available here:
* [kickstart-modular.nvim](https://github.com/dam9000/kickstart-modular.nvim)
* Discussions on this topic can be found here:
@@ -174,7 +181,7 @@ run in cmd as **admin**:
winget install --accept-source-agreements chocolatey.chocolatey
```
2. install all requirements using choco, exit previous cmd and
2. install all requirements using choco, exit the previous cmd and
open a new one so that choco path is set, and run in cmd as **admin**:
```
choco install -y neovim git ripgrep wget fd unzip gzip mingw make

View File

@@ -91,7 +91,7 @@ vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
-- Set to true if you have a Nerd Font installed and selected in the terminal
vim.g.have_nerd_font = false
vim.g.have_nerd_font = true
-- [[ Setting options ]]
-- See `:help vim.opt`
@@ -102,7 +102,7 @@ vim.g.have_nerd_font = false
vim.opt.number = true
-- You can also add relative line numbers, to help with jumping.
-- Experiment for yourself to see if you like it!
-- vim.opt.relativenumber = true
vim.opt.relativenumber = true
-- Enable mouse mode, can be useful for resizing splits for example!
vim.opt.mouse = 'a'
@@ -135,7 +135,6 @@ vim.opt.signcolumn = 'yes'
vim.opt.updatetime = 250
-- Decrease mapped sequence wait time
-- Displays which-key popup sooner
vim.opt.timeoutlen = 300
-- Configure how new splits should be opened
@@ -274,6 +273,9 @@ require('lazy').setup({
'folke/which-key.nvim',
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
opts = {
-- delay between pressing a key and opening which-key (milliseconds)
-- this setting is independent of vim.opt.timeoutlen
delay = 0,
icons = {
-- set icon mappings to true if you have a Nerd Font
mappings = vim.g.have_nerd_font,
@@ -641,6 +643,9 @@ require('lazy').setup({
},
},
},
ansiblels = {
filetypes = { 'yaml.ansible', 'ansible' },
},
}
-- Ensure the servers and tools above are installed
@@ -656,6 +661,7 @@ require('lazy').setup({
local ensure_installed = vim.tbl_keys(servers or {})
vim.list_extend(ensure_installed, {
'stylua', -- Used to format Lua code
'ansible-language-server', -- Ansible LSP for YAML Ansible files
})
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
@@ -825,6 +831,7 @@ require('lazy').setup({
-- set group index to 0 to skip loading LuaLS completions as lazydev recommends it
group_index = 0,
},
{ name = 'copilot' },
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = 'path' },
@@ -893,8 +900,9 @@ require('lazy').setup({
},
{ -- Highlight, edit, and navigate code
'nvim-treesitter/nvim-treesitter',
lazy = false,
build = ':TSUpdate',
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
main = 'nvim-treesitter.config', -- Sets main module to use for opts
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
opts = {
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' },
@@ -926,18 +934,17 @@ require('lazy').setup({
-- Here are some example plugins that I've included in the Kickstart repository.
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
--
-- require 'kickstart.plugins.debug',
-- require 'kickstart.plugins.indent_line',
-- require 'kickstart.plugins.lint',
-- require 'kickstart.plugins.autopairs',
-- require 'kickstart.plugins.neo-tree',
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
require 'kickstart.plugins.debug',
require 'kickstart.plugins.indent_line',
require 'kickstart.plugins.lint',
require 'kickstart.plugins.autopairs',
require 'kickstart.plugins.neo-tree',
require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
-- This is the easiest way to modularize your config.
--
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
-- { import = 'custom.plugins' },
{ import = 'custom.plugins' },
--
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
-- Or use telescope!

0
lua/custom/options.lua Normal file
View File

View File

@@ -0,0 +1,21 @@
-- Ansible configuration for detecting .yml files in roles and playbooks directories
return {
{
'neovim/nvim-lspconfig',
optional = true,
-- This table sets up file type detection for Ansible files
init = function()
-- Set up autocommand to detect Ansible files and set their filetype
local ansible_augroup = vim.api.nvim_create_augroup('ansible-detection', { clear = true })
vim.api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, {
group = ansible_augroup,
pattern = { '*/roles/**/*.yml', '*/roles/**/*.yaml', '*/playbooks/**/*.yml', '*/playbooks/**/*.yaml', '*/hosts/**/*.yml', '*/hosts/**/*.yaml' },
callback = function()
vim.bo.filetype = 'yaml.ansible'
end,
desc = 'Set filetype to yaml.ansible for Ansible files',
})
end,
},
}

View File

@@ -0,0 +1,10 @@
return {
'olimorris/codecompanion.nvim',
opts = {
ignore_warnings = true,
},
dependencies = {
'nvim-lua/plenary.nvim',
'nvim-treesitter/nvim-treesitter',
},
}

View File

@@ -0,0 +1,38 @@
return {
{
'zbirenbaum/copilot.lua',
cmd = 'Copilot',
event = 'InsertEnter',
config = function()
require('copilot').setup {
suggestion = { enabled = false },
panel = { enabled = false },
filetypes = {
yaml = true,
['yaml.ansible'] = true,
},
}
end,
},
{
'zbirenbaum/copilot-cmp',
event = 'InsertEnter',
config = function()
require('copilot_cmp').setup()
end,
dependencies = {
'zbirenbaum/copilot.lua',
cmd = 'Copilot',
config = function()
require('copilot').setup {
suggestion = { enabled = true },
panel = { enabled = true },
filetypes = {
yaml = true,
['yaml.ansible'] = true,
},
}
end,
},
},
}

View File

@@ -0,0 +1,50 @@
return {
'ThePrimeagen/harpoon',
branch = 'harpoon2',
requires = { { 'nvim-lua/plenary.nvim' } },
config = function()
local harpoon = require 'harpoon'
harpoon:setup()
-- Harpoon remaps
vim.keymap.set('n', '<leader>hm', function()
harpoon:list():append()
end, { desc = 'Add buffer to Harpoon list' })
vim.keymap.set('n', '<C-e>', function()
harpoon.ui:toggle_quick_menu(harpoon:list())
end)
vim.keymap.set('n', '<C-h>', function()
harpoon:list():select(1)
end)
vim.keymap.set('n', '<C-t>', function()
harpoon:list():select(2)
end)
vim.keymap.set('n', '<C-s>', function()
harpoon:list():select(3)
end)
-- Toggle previous & next buffers stored within Harpoon list
vim.keymap.set('n', '<C-S-P>', function()
harpoon:list():prev()
end)
vim.keymap.set('n', '<C-S-N>', function()
harpoon:list():next()
end)
harpoon:extend {
UI_CREATE = function(cx)
vim.keymap.set('n', '<C-v>', function()
harpoon.ui:select_menu_item { vsplit = true }
end, { buffer = cx.bufnr })
vim.keymap.set('n', '<C-x>', function()
harpoon.ui:select_menu_item { split = true }
end, { buffer = cx.bufnr })
vim.keymap.set('n', '<C-t>', function()
harpoon.ui:select_menu_item { tabedit = true }
end, { buffer = cx.bufnr })
end,
}
end,
}

View File

@@ -2,4 +2,6 @@
-- I promise not to create any merge conflicts in this directory :)
--
-- See the kickstart.nvim README for more information
return {}
return {
require 'custom.plugins.ansible',
}

View File

@@ -0,0 +1,10 @@
return {
'kdheepak/lazygit.nvim',
-- optional for floating window border decoration
dependencies = {
'nvim-lua/plenary.nvim',
},
config = function()
vim.keymap.set('n', '<leader>gg', ':LazyGit <CR>')
end,
}

View File

@@ -0,0 +1,14 @@
return {
-- 'ravitemer/mcphub.nvim',
-- dependencies = {
-- 'nvim-lua/plenary.nvim', -- Required for Job and HTTP requests
-- },
-- -- uncomment the following line to load hub lazily
-- --cmd = "MCPHub", -- lazy load
-- build = 'npm install -g mcp-hub@latest', -- Installs required mcp-hub npm module
-- -- uncomment this if you don't want mcp-hub to be available globally or can't use -g
-- -- build = "bundled_build.lua", -- Use this and set use_bundled_binary = true in opts (see Advanced configuration)
-- config = function()
-- require('mcphub').setup()
-- end,
}

View File

@@ -0,0 +1,15 @@
return {
'folke/noice.nvim',
event = 'VeryLazy',
opts = {
-- add any options here
},
dependencies = {
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
'MunifTanjim/nui.nvim',
-- OPTIONAL:
-- `nvim-notify` is only needed, if you want to use the notification view.
-- If not available, we use `mini` as the fallback
'rcarriga/nvim-notify',
},
}

View File

@@ -0,0 +1,41 @@
return {
{
'akinsho/toggleterm.nvim',
-- [[ cmd = { "toggleterm", "termexec" }, ]]
opts = {
-- close_on_exit = false,
highlights = {
normal = { link = 'normal' },
normalnc = { link = 'normalnc' },
normalfloat = { link = 'normalfloat' },
floatborder = { link = 'floatborder' },
statusline = { link = 'statusline' },
statuslinenc = { link = 'statuslinenc' },
winbar = { link = 'winbar' },
winbarnc = { link = 'winbarnc' },
},
on_create = function()
vim.opt.foldcolumn = '0'
vim.opt.signcolumn = 'no'
end,
size = function(term)
if term.direction == 'horizontal' then
return 15
elseif term.direction == 'vertical' then
return vim.o.columns * 0.4
end
end,
shell = 'bash',
open_mapping = [[<f12>]],
shading_factor = 2,
direction = 'float',
float_opts = { border = 'rounded' },
vim.keymap.set('n', '<leader>tv', '<Cmd>ToggleTerm direction=vertical<CR>', { desc = 'ToggleTerm vertical' }),
vim.keymap.set('n', '<leader>tnv', '<Cmd>TermNew direction=vertical<CR>', { desc = 'ToggleTerm New vertical' }),
vim.keymap.set('n', '<leader>tt', '<Cmd>ToggleTerm direction=horizontal<CR>', { desc = 'ToggleTerm horizontal' }),
vim.keymap.set('n', '<leader>tnh', '<Cmd>TermNew direction=horizontal<CR>', { desc = 'ToggleTerm New horizontal' }),
vim.keymap.set('n', '<leader>tf', '<Cmd>ToggleTerm direction=float<CR>', { desc = 'ToggleTerm float' }),
vim.api.nvim_set_keymap('t', '<Esc>', '<C-\\><C-n>', { noremap = true }),
},
},
}

View File

@@ -0,0 +1,26 @@
return {
'fatih/vim-go', -- Popular Go plugin
config = function()
-- Explicitly set Go-specific indentation
vim.api.nvim_create_augroup('GoIndentation', { clear = true })
vim.api.nvim_create_autocmd('FileType', {
group = 'GoIndentation',
pattern = 'go',
callback = function()
vim.opt_local.tabstop = 4
vim.opt_local.shiftwidth = 4
vim.opt_local.softtabstop = 4
vim.opt_local.expandtab = false -- Go prefers tabs, not spaces
end,
})
-- Additional Go-specific settings
vim.g.go_fmt_command = 'goimports' -- Automatically import packages
vim.g.go_auto_type_info = 1 -- Show type information
vim.g.go_highlight_types = 1
vim.g.go_highlight_fields = 1
vim.g.go_highlight_functions = 1
vim.g.go_highlight_function_calls = 1
vim.g.go_highlight_operators = 1
vim.g.go_highlight_extra_types = 1
end,
}

View File

@@ -11,7 +11,7 @@ return {
},
cmd = 'Neotree',
keys = {
{ '\\', ':Neotree reveal<CR>', desc = 'NeoTree reveal', silent = true },
{ '\\', ':Neotree reveal right<CR>', desc = 'NeoTree reveal', silent = true },
},
opts = {
filesystem = {