Skip to content

Commit dd1c590

Browse files
Film0retalirajdam9000tjdevries
authored
Daniel branch (#1)
* My config: * Added in themeing and a few plugins * feat: use VimEnter event instead of VeryLazy (nvim-lua#673) * README.md: updated windows install instructions (nvim-lua#674) * Added in Git fugitive/rhubarb for git * fix: add note in readme for custom plugins * fix: checkhealth reported nvim version (nvim-lua#685) * Removed debugging, will properly set up later * Implemented and configured harpoon --------- Co-authored-by: Taulant Aliraj <tau141@gmail.com> Co-authored-by: Damjan 9000 <damjan.9000@gmail.com> Co-authored-by: TJ DeVries <devries.timothyj@gmail.com>
1 parent 94a9364 commit dd1c590

File tree

9 files changed

+147
-34
lines changed

9 files changed

+147
-34
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ Neovim's configurations are located under the following paths, depending on your
4343
| Windows (cmd)| `%userprofile%\AppData\Local\nvim\` |
4444
| Windows (powershell)| `$env:USERPROFILE\AppData\Local\nvim\` |
4545

46+
### Install Kickstart
47+
4648
Clone kickstart.nvim:
4749

4850
<details><summary> Linux and Mac </summary>
@@ -100,6 +102,8 @@ can install to your machine using the methods above.
100102
101103
#### Examples of adding popularly requested plugins
102104

105+
NOTE: You'll need to uncomment the line in the init.lua that turns on loading custom plugins.
106+
103107
<details>
104108
<summary>Adding autopairs</summary>
105109

@@ -192,3 +196,23 @@ This requires:
192196
```lua
193197
{'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' }
194198
```
199+
200+
Alternatively one can install gcc and make which don't require changing the config,
201+
the easiest way is to use choco:
202+
203+
1. install [chocolatey](https://chocolatey.org/install)
204+
either follow the instructions on the page or use winget,
205+
run in cmd as **admin**:
206+
```
207+
winget install --accept-source-agreements chocolatey.chocolatey
208+
```
209+
210+
2. install all requirements using choco, exit previous cmd and
211+
open a new one so that choco path is set, run in cmd as **admin**:
212+
```
213+
choco install -y neovim git ripgrep wget fd unzip gzip mingw make
214+
```
215+
216+
Then continue with the [Install Kickstart](#Install-Kickstart) step.
217+
218+

init.lua

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,10 @@ vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagn
170170
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
171171

172172
-- TIP: Disable arrow keys in normal mode
173-
-- vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
174-
-- vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
175-
-- vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
176-
-- vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
173+
vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
174+
vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
175+
vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
176+
vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
177177

178178
-- Keybinds to make split navigation easier.
179179
-- Use CTRL+<hjkl> to switch between windows
@@ -258,9 +258,9 @@ require('lazy').setup {
258258
-- lazy loading plugins that don't need to be loaded immediately at startup.
259259
--
260260
-- For example, in the following configuration, we use:
261-
-- event = 'VeryLazy'
261+
-- event = 'VimEnter'
262262
--
263-
-- which loads which-key after all the UI elements are loaded. Events can be
263+
-- which loads which-key before all the UI elements are loaded. Events can be
264264
-- normal autocommands events (`:help autocmd-events`).
265265
--
266266
-- Then, because we use the `config` key, the configuration only runs
@@ -269,7 +269,7 @@ require('lazy').setup {
269269

270270
{ -- Useful plugin to show you pending keybinds.
271271
'folke/which-key.nvim',
272-
event = 'VeryLazy', -- Sets the loading event to 'VeryLazy'
272+
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
273273
config = function() -- This is the function that runs, AFTER loading
274274
require('which-key').setup()
275275

@@ -293,7 +293,7 @@ require('lazy').setup {
293293

294294
{ -- Fuzzy Finder (files, lsp, etc)
295295
'nvim-telescope/telescope.nvim',
296-
event = 'VeryLazy',
296+
event = 'VimEnter',
297297
branch = '0.1.x',
298298
dependencies = {
299299
'nvim-lua/plenary.nvim',
@@ -614,11 +614,11 @@ require('lazy').setup {
614614
formatters_by_ft = {
615615
lua = { 'stylua' },
616616
-- Conform can also run multiple formatters sequentially
617-
-- python = { "isort", "black" },
617+
python = { 'isort', 'black' },
618618
--
619619
-- You can use a sub-list to tell conform to run *until* a formatter
620620
-- is found.
621-
-- javascript = { { "prettierd", "prettier" } },
621+
javascript = { { 'prettierd', 'prettier' } },
622622
},
623623
},
624624
},
@@ -716,25 +716,25 @@ require('lazy').setup {
716716
end,
717717
},
718718

719-
{ -- You can easily change to a different colorscheme.
720-
-- Change the name of the colorscheme plugin below, and then
721-
-- change the command in the config to whatever the name of that colorscheme is
722-
--
723-
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`
724-
'folke/tokyonight.nvim',
725-
lazy = false, -- make sure we load this during startup if it is your main colorscheme
726-
priority = 1000, -- make sure to load this before all the other start plugins
727-
config = function()
728-
-- Load the colorscheme here
729-
vim.cmd.colorscheme 'tokyonight-night'
730-
731-
-- You can configure highlights by doing something like
732-
vim.cmd.hi 'Comment gui=none'
733-
end,
734-
},
719+
-- { -- You can easily change to a different colorscheme.
720+
-- -- Change the name of the colorscheme plugin below, and then
721+
-- -- change the command in the config to whatever the name of that colorscheme is
722+
-- --
723+
-- -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`
724+
-- 'folke/tokyonight.nvim',
725+
-- lazy = false, -- make sure we load this during startup if it is your main colorscheme
726+
-- priority = 1000, -- make sure to load this before all the other start plugins
727+
-- config = function()
728+
-- -- Load the colorscheme here
729+
-- vim.cmd.colorscheme 'tokyonight-night'
730+
731+
-- -- You can configure highlights by doing something like
732+
-- vim.cmd.hi 'Comment gui=none'
733+
-- end,
734+
-- },
735735

736736
-- Highlight todo, notes, etc in comments
737-
{ 'folke/todo-comments.nvim', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
737+
{ 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
738738

739739
{ -- Collection of various small independent plugins/modules
740740
'echasnovski/mini.nvim',
@@ -758,7 +758,7 @@ require('lazy').setup {
758758
-- You could remove this setup call if you don't like it,
759759
-- and try some other statusline plugin
760760
local statusline = require 'mini.statusline'
761-
statusline.setup()
761+
-- statusline.setup()
762762

763763
-- You can configure sections in the statusline by overriding their
764764
-- default behavior. For example, here we disable the section for
@@ -813,8 +813,8 @@ require('lazy').setup {
813813
-- This is the easiest way to modularize your config.
814814
--
815815
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
816-
-- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
817-
-- { import = 'custom.plugins' },
816+
-- For additional information see: :help lazy.nvim-lazy.nvim-structuring-your-plugins
817+
{ import = 'custom.plugins' },
818818
}
819819

820820
-- The line beneath this is called `modeline`. See `:help modeline`

lua/custom/plugins/dap-python.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
return {
2+
"mfussenegger/nvim-dap-python",
3+
ft = "python",
4+
lazy = false,
5+
}

lua/custom/plugins/harpoon.lua

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
return {
2+
'ThePrimeagen/harpoon',
3+
branch = 'harpoon2',
4+
config = function()
5+
local harpoon = require 'harpoon'
6+
---@diagnostic disable-next-line: missing-parameter
7+
harpoon:setup()
8+
local function map(lhs, rhs, opts)
9+
vim.keymap.set('n', lhs, rhs, opts or {})
10+
end
11+
map('<leader>ja', function()
12+
harpoon:list():append()
13+
end, { desc = 'Append Current File' })
14+
map('<leader>e', function()
15+
harpoon.ui:toggle_quick_menu(harpoon:list())
16+
end, { desc = 'Toggle Harpoon Quick Menu' })
17+
map('<leader>jj', function()
18+
harpoon:list():select(1)
19+
end, { desc = 'Select First Item in Harpoon List' })
20+
map('<leader>jk', function()
21+
harpoon:list():select(2)
22+
end, { desc = 'Select Second Item in Harpoon List' })
23+
map('<leader>jl', function()
24+
harpoon:list():select(3)
25+
end, { desc = 'Select Third Item in Harpoon List' })
26+
map('<leader>hl', function()
27+
harpoon:list():select(4)
28+
end, { desc = 'Select Fourth Item in Harpoon List' })
29+
map('<leader>jp', function()
30+
harpoon:list():prev()
31+
end, { desc = 'Move to Previous Item in Harpoon List' })
32+
map('<leader>jn', function()
33+
harpoon:list():next()
34+
end, { desc = 'Move to Next Item in Harpoon List' })
35+
end,
36+
}

lua/custom/plugins/init.lua

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,24 @@
22
-- I promise not to create any merge conflicts in this directory :)
33
--
44
-- See the kickstart.nvim README for more information
5-
return {}
5+
-- Set the number of spaces inserted for each level of indentation
6+
vim.opt.shiftwidth = 4
7+
8+
-- Set the number of spaces that a <Tab> character in the file counts for
9+
vim.opt.softtabstop = 4
10+
11+
-- Set the number of spaces that a <Tab> in the file inserts
12+
vim.opt.tabstop = 4
13+
14+
vim.opt.number = true
15+
vim.opt.relativenumber = true
16+
17+
--vim.opt.expandtab = true
18+
19+
return {
20+
'christoomey/vim-tmux-navigator',
21+
'wakatime/vim-wakatime',
22+
'folke/zen-mode.nvim',
23+
'tpope/vim-fugitive',
24+
'tpope/vim-rhubarb',
25+
}

lua/custom/plugins/lualine.lua

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
return {
2+
{
3+
'nvim-lualine/lualine.nvim',
4+
dependencies = { 'nvim-tree/nvim-web-devicons' },
5+
6+
config = {
7+
options = {
8+
theme = 'auto',
9+
section_separators = { '', '' },
10+
component_separators = { '', '' },
11+
},
12+
}
13+
}
14+
}

lua/custom/plugins/theme.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
return {
2+
'rebelot/kanagawa.nvim',
3+
lazy = false,
4+
priority = 1000,
5+
config = function()
6+
vim.cmd("colorscheme kanagawa-wave")
7+
end
8+
}

lua/custom/plugins/undotree.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
vim.keymap.set('n', '<leader><F5>', vim.cmd.UndotreeToggle, { desc = 'Open undo tree' })
2+
3+
return {
4+
'mbbill/undotree',
5+
}

lua/kickstart/health.lua

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@
66
--]]
77

88
local check_version = function()
9+
local verstr = string.format('%s.%s.%s', vim.version().major, vim.version().minor, vim.version().patch)
910
if not vim.version.cmp then
10-
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", tostring(vim.version())))
11+
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
1112
return
1213
end
1314

1415
if vim.version.cmp(vim.version(), { 0, 9, 4 }) >= 0 then
15-
vim.health.ok(string.format("Neovim version is: '%s'", tostring(vim.version())))
16+
vim.health.ok(string.format("Neovim version is: '%s'", verstr))
1617
else
17-
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", tostring(vim.version())))
18+
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
1819
end
1920
end
2021

0 commit comments

Comments
 (0)