Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
37 changes: 0 additions & 37 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# kickstart.nvim

> Janghoon's fork of [kickstart.nvim](https://github.com/nvim-lua/kickstart.nvim)
> with oil, flash, harpoon, lazygit, render-markdown, sidekick (Redrob Code as the
> default AI agent), codecompanion and tmux navigation. Needs Neovim 0.12+.

## Quick install

```sh
# back up any existing config first
mv "${XDG_CONFIG_HOME:-$HOME/.config}/nvim" "${XDG_CONFIG_HOME:-$HOME/.config}/nvim.bak" 2>/dev/null
git clone https://github.com/its-janghoon/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}/nvim"
nvim # plugins install on first start
```

Optional tools: `tmux`, `lazygit`, `rg`, `fd`, and the `redrob` CLI for `<leader>aa`.

## Introduction

A starting point for Neovim that is:
Expand Down Expand Up @@ -91,7 +106,7 @@ it's recommended to track it in version control (see `:help vim.pack-lockfile`).
<details><summary> Linux and Mac </summary>

```sh
git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim
git clone https://github.com/its-janghoon/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim
```

</details>
Expand All @@ -101,13 +116,13 @@ git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HO
If you're using `cmd.exe`:

```
git clone https://github.com/nvim-lua/kickstart.nvim.git "%localappdata%\nvim"
git clone https://github.com/its-janghoon/kickstart.nvim.git "%localappdata%\nvim"
```

If you're using `powershell.exe`

```
git clone https://github.com/nvim-lua/kickstart.nvim.git "${env:LOCALAPPDATA}\nvim"
git clone https://github.com/its-janghoon/kickstart.nvim.git "${env:LOCALAPPDATA}\nvim"
```

</details>
Expand Down
24 changes: 0 additions & 24 deletions doc/kickstart.txt

This file was deleted.

3 changes: 0 additions & 3 deletions doc/tags

This file was deleted.

19 changes: 13 additions & 6 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ do
-- See `:help hlsearch`
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')

-- Add <leader>pv to exit to directory
vim.keymap.set('n', '<leader>pv', vim.cmd.Ex)

-- Diagnostic Config & Keymaps
-- See `:help vim.diagnostic.Opts`
vim.diagnostic.config {
Expand Down Expand Up @@ -413,6 +416,10 @@ do
{ '<leader>s', group = '[S]earch', mode = { 'n', 'v' } },
{ '<leader>t', group = '[T]oggle' },
{ '<leader>h', group = 'Git [H]unk', mode = { 'n', 'v' } }, -- Enable gitsigns recommended keymaps first
{ '<leader>a', group = '[A]I CLI (sidekick)', mode = { 'n', 'x' } },
{ '<leader>c', group = '[C]odeCompanion', mode = { 'n', 'v' } },
{ '<leader>g', group = '[G]it' },
{ '<leader>m', group = 'Harpoon [M]arks' },
{ 'gr', group = 'LSP Actions', mode = { 'n' } },
},
}
Expand Down Expand Up @@ -1014,16 +1021,16 @@ do
-- 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.debug'
require 'kickstart.plugins.indent_line'
require 'kickstart.plugins.lint'
require 'kickstart.plugins.autopairs'
require 'kickstart.plugins.neo-tree'

-- NOTE: You can add your own plugins, configuration, etc. in `lua/custom/plugins/*.lua`.
--
-- For independent modules, uncomment the convenience loader:
-- require 'custom.plugins'
require 'custom.plugins'
--
-- `custom.plugins` automatically loads files from that directory, but their
-- order is unspecified. If plugins depend on each other, keep them in the same
Expand Down
47 changes: 47 additions & 0 deletions lua/custom/plugins/ai.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
-- AI coding agents
-- * sidekick.nvim: run any AI CLI (claude, codex, gemini, copilot, opencode, ...)
-- in a side terminal, send file/selection/diagnostics as context.
-- CLI sessions live in tmux so they survive closing Neovim.
-- NES (Copilot "next edit suggestions") is off: it needs a Copilot login.
-- * codecompanion.nvim: chat + inline edits with diff review.
-- Default adapter is copilot; set `strategies.*.adapter` for anthropic/openai/ollama.
local function gh(repo) return 'https://github.com/' .. repo end

vim.pack.add {
gh 'nvim-lua/plenary.nvim',
gh 'folke/sidekick.nvim',
gh 'olimorris/codecompanion.nvim',
}

-- [[ sidekick.nvim ]]
require('sidekick').setup {
nes = { enabled = false },
cli = {
picker = 'telescope',
mux = {
backend = 'tmux',
enabled = vim.fn.executable 'tmux' == 1,
create = 'terminal',
},
-- Redrob Code is the default agent (`<leader>aa`). Needs `redrob` on PATH.
tools = { redrob = { cmd = { 'redrob' } } },
},
}
local sk = function() return require 'sidekick.cli' end
vim.keymap.set({ 'n', 't', 'i', 'x' }, '<C-.>', function() sk().focus() end, { desc = 'Sidekick focus' })
vim.keymap.set('n', '<leader>aa', function() sk().toggle { name = 'redrob', focus = true } end, { desc = 'Sidekick toggle Redrob Code' })
vim.keymap.set('n', '<leader>ar', function() sk().toggle { name = 'redrob', focus = true } end, { desc = 'Sidekick [R]edrob Code' })
vim.keymap.set('n', '<leader>as', function() sk().select() end, { desc = 'Sidekick [S]elect CLI' })
vim.keymap.set('n', '<leader>ad', function() sk().close() end, { desc = 'Sidekick [D]etach session' })
vim.keymap.set({ 'n', 'x' }, '<leader>at', function() sk().send { msg = '{this}' } end, { desc = 'Sidekick send [T]his' })
vim.keymap.set('n', '<leader>af', function() sk().send { msg = '{file}' } end, { desc = 'Sidekick send [F]ile' })
vim.keymap.set('x', '<leader>av', function() sk().send { msg = '{selection}' } end, { desc = 'Sidekick send [V]isual' })
vim.keymap.set({ 'n', 'x' }, '<leader>ap', function() sk().prompt() end, { desc = 'Sidekick [P]rompt' })
vim.keymap.set('n', '<leader>ac', function() sk().toggle { name = 'claude', focus = true } end, { desc = 'Sidekick [C]laude' })

-- [[ codecompanion.nvim ]]
require('codecompanion').setup {}
vim.keymap.set({ 'n', 'v' }, '<leader>cc', '<Cmd>CodeCompanionChat Toggle<CR>', { desc = 'CodeCompanion [C]hat' })
vim.keymap.set({ 'n', 'v' }, '<leader>ca', '<Cmd>CodeCompanionActions<CR>', { desc = 'CodeCompanion [A]ctions' })
vim.keymap.set('v', '<leader>ce', ":'<,'>CodeCompanion ", { desc = 'CodeCompanion inline [E]dit' })
vim.keymap.set('v', 'ga', '<Cmd>CodeCompanionChat Add<CR>', { desc = 'Add selection to CodeCompanion chat' })
35 changes: 35 additions & 0 deletions lua/custom/plugins/editing.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
-- Editing / navigation: oil (file manager as buffer), flash (jump), harpoon (pin files)
local function gh(repo) return 'https://github.com/' .. repo end

vim.pack.add {
gh 'nvim-lua/plenary.nvim',
gh 'stevearc/oil.nvim',
gh 'folke/flash.nvim',
{ src = gh 'ThePrimeagen/harpoon', version = 'harpoon2' },
}

-- [[ oil.nvim ]] edit the filesystem like a buffer, `:w` applies
require('oil').setup {
default_file_explorer = true,
view_options = { show_hidden = true },
}
vim.keymap.set('n', '-', '<Cmd>Oil<CR>', { desc = 'Open parent directory (oil)' })
-- keep <leader>pv as "project view" but open oil instead of netrw
vim.keymap.set('n', '<leader>pv', '<Cmd>Oil<CR>', { desc = '[P]roject [V]iew (oil)' })

-- [[ flash.nvim ]] jump anywhere on screen with labels
require('flash').setup {}
vim.keymap.set({ 'n', 'x', 'o' }, 's', function() require('flash').jump() end, { desc = 'Flash jump' })
vim.keymap.set({ 'n', 'x', 'o' }, 'S', function() require('flash').treesitter() end, { desc = 'Flash treesitter' })
vim.keymap.set('o', 'r', function() require('flash').remote() end, { desc = 'Remote flash' })

-- [[ harpoon ]] pin a handful of files and jump between them
local harpoon = require 'harpoon'
harpoon:setup()
vim.keymap.set('n', '<leader>ma', function() harpoon:list():add() end, { desc = 'Harpoon [A]dd file' })
vim.keymap.set('n', '<leader>mm', function() harpoon.ui:toggle_quick_menu(harpoon:list()) end, { desc = 'Harpoon [M]enu' })
for i = 1, 4 do
vim.keymap.set('n', '<leader>' .. i, function() harpoon:list():select(i) end, { desc = 'Harpoon file ' .. i })
end
vim.keymap.set('n', '<leader>mp', function() harpoon:list():prev() end, { desc = 'Harpoon [P]rev' })
vim.keymap.set('n', '<leader>mn', function() harpoon:list():next() end, { desc = 'Harpoon [N]ext' })
10 changes: 10 additions & 0 deletions lua/custom/plugins/git.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
-- Git: lazygit in a floating window (needs the `lazygit` binary on PATH)
local function gh(repo) return 'https://github.com/' .. repo end

vim.pack.add {
gh 'nvim-lua/plenary.nvim',
gh 'kdheepak/lazygit.nvim',
}

vim.keymap.set('n', '<leader>gg', '<Cmd>LazyGit<CR>', { desc = 'Lazy[G]it' })
vim.keymap.set('n', '<leader>gf', '<Cmd>LazyGitCurrentFile<CR>', { desc = 'LazyGit current [F]ile' })
9 changes: 9 additions & 0 deletions lua/custom/plugins/markdown.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-- Markdown rendered in-buffer (headings, tables, callouts, code blocks)
local function gh(repo) return 'https://github.com/' .. repo end

vim.pack.add { gh 'MeanderingProgrammer/render-markdown.nvim' }

require('render-markdown').setup {
file_types = { 'markdown', 'codecompanion' },
}
vim.keymap.set('n', '<leader>tm', '<Cmd>RenderMarkdown toggle<CR>', { desc = '[T]oggle [M]arkdown render' })
16 changes: 16 additions & 0 deletions lua/custom/plugins/tmux.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
-- tmux: <C-h/j/k/l> moves between Neovim splits AND tmux panes as one grid.
-- Pair with this in ~/.tmux.conf (see https://github.com/christoomey/vim-tmux-navigator):
-- is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|l?n?vim?x?|fzf)(diff)?$'"
-- bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'
-- bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D'
-- bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U'
-- bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R'
local function gh(repo) return 'https://github.com/' .. repo end

vim.pack.add { gh 'christoomey/vim-tmux-navigator' }

-- The plugin defines its own <C-h/j/k/l> maps; override kickstart's plain window maps.
vim.keymap.set('n', '<C-h>', '<Cmd>TmuxNavigateLeft<CR>', { desc = 'Move focus left (tmux-aware)' })
vim.keymap.set('n', '<C-j>', '<Cmd>TmuxNavigateDown<CR>', { desc = 'Move focus down (tmux-aware)' })
vim.keymap.set('n', '<C-k>', '<Cmd>TmuxNavigateUp<CR>', { desc = 'Move focus up (tmux-aware)' })
vim.keymap.set('n', '<C-l>', '<Cmd>TmuxNavigateRight<CR>', { desc = 'Move focus right (tmux-aware)' })