Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Daniel branch #1

Merged
merged 11 commits into from
Mar 4, 2024
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ Neovim's configurations are located under the following paths, depending on your
| Windows (cmd)| `%userprofile%\AppData\Local\nvim\` |
| Windows (powershell)| `$env:USERPROFILE\AppData\Local\nvim\` |

### Install Kickstart

Clone kickstart.nvim:

<details><summary> Linux and Mac </summary>
Expand Down Expand Up @@ -100,6 +102,8 @@ can install to your machine using the methods above.

#### Examples of adding popularly requested plugins

NOTE: You'll need to uncomment the line in the init.lua that turns on loading custom plugins.

<details>
<summary>Adding autopairs</summary>

Expand Down Expand Up @@ -192,3 +196,23 @@ This requires:
```lua
{'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' }
```

Alternatively one can install gcc and make which don't require changing the config,
the easiest way is to use choco:

1. install [chocolatey](https://chocolatey.org/install)
either follow the instructions on the page or use winget,
run in cmd as **admin**:
```
winget install --accept-source-agreements chocolatey.chocolatey
```

2. install all requirements using choco, exit previous cmd and
open a new one so that choco path is set, run in cmd as **admin**:
```
choco install -y neovim git ripgrep wget fd unzip gzip mingw make
```

Then continue with the [Install Kickstart](#Install-Kickstart) step.


60 changes: 30 additions & 30 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,10 @@ vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagn
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })

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

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

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

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

{ -- Fuzzy Finder (files, lsp, etc)
'nvim-telescope/telescope.nvim',
event = 'VeryLazy',
event = 'VimEnter',
branch = '0.1.x',
dependencies = {
'nvim-lua/plenary.nvim',
Expand Down Expand Up @@ -614,11 +614,11 @@ require('lazy').setup {
formatters_by_ft = {
lua = { 'stylua' },
-- Conform can also run multiple formatters sequentially
-- python = { "isort", "black" },
python = { 'isort', 'black' },
--
-- You can use a sub-list to tell conform to run *until* a formatter
-- is found.
-- javascript = { { "prettierd", "prettier" } },
javascript = { { 'prettierd', 'prettier' } },
},
},
},
Expand Down Expand Up @@ -716,25 +716,25 @@ require('lazy').setup {
end,
},

{ -- You can easily change to a different colorscheme.
-- Change the name of the colorscheme plugin below, and then
-- change the command in the config to whatever the name of that colorscheme is
--
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`
'folke/tokyonight.nvim',
lazy = false, -- make sure we load this during startup if it is your main colorscheme
priority = 1000, -- make sure to load this before all the other start plugins
config = function()
-- Load the colorscheme here
vim.cmd.colorscheme 'tokyonight-night'

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

-- -- You can configure highlights by doing something like
-- vim.cmd.hi 'Comment gui=none'
-- end,
-- },

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

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

-- You can configure sections in the statusline by overriding their
-- default behavior. For example, here we disable the section for
Expand Down Expand Up @@ -813,8 +813,8 @@ require('lazy').setup {
-- 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.
-- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
-- { import = 'custom.plugins' },
-- For additional information see: :help lazy.nvim-lazy.nvim-structuring-your-plugins
{ import = 'custom.plugins' },
}

-- The line beneath this is called `modeline`. See `:help modeline`
Expand Down
5 changes: 5 additions & 0 deletions lua/custom/plugins/dap-python.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
return {
"mfussenegger/nvim-dap-python",
ft = "python",
lazy = false,
}
36 changes: 36 additions & 0 deletions lua/custom/plugins/harpoon.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
return {
'ThePrimeagen/harpoon',
branch = 'harpoon2',
config = function()
local harpoon = require 'harpoon'
---@diagnostic disable-next-line: missing-parameter
harpoon:setup()
local function map(lhs, rhs, opts)
vim.keymap.set('n', lhs, rhs, opts or {})
end
map('<leader>ja', function()
harpoon:list():append()
end, { desc = 'Append Current File' })
map('<leader>e', function()
harpoon.ui:toggle_quick_menu(harpoon:list())
end, { desc = 'Toggle Harpoon Quick Menu' })
map('<leader>jj', function()
harpoon:list():select(1)
end, { desc = 'Select First Item in Harpoon List' })
map('<leader>jk', function()
harpoon:list():select(2)
end, { desc = 'Select Second Item in Harpoon List' })
map('<leader>jl', function()
harpoon:list():select(3)
end, { desc = 'Select Third Item in Harpoon List' })
map('<leader>hl', function()
harpoon:list():select(4)
end, { desc = 'Select Fourth Item in Harpoon List' })
map('<leader>jp', function()
harpoon:list():prev()
end, { desc = 'Move to Previous Item in Harpoon List' })
map('<leader>jn', function()
harpoon:list():next()
end, { desc = 'Move to Next Item in Harpoon List' })
end,
}
22 changes: 21 additions & 1 deletion lua/custom/plugins/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,24 @@
-- I promise not to create any merge conflicts in this directory :)
--
-- See the kickstart.nvim README for more information
return {}
-- Set the number of spaces inserted for each level of indentation
vim.opt.shiftwidth = 4

-- Set the number of spaces that a <Tab> character in the file counts for
vim.opt.softtabstop = 4

-- Set the number of spaces that a <Tab> in the file inserts
vim.opt.tabstop = 4

vim.opt.number = true
vim.opt.relativenumber = true

--vim.opt.expandtab = true

return {
'christoomey/vim-tmux-navigator',
'wakatime/vim-wakatime',
'folke/zen-mode.nvim',
'tpope/vim-fugitive',
'tpope/vim-rhubarb',
}
14 changes: 14 additions & 0 deletions lua/custom/plugins/lualine.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
return {
{
'nvim-lualine/lualine.nvim',
dependencies = { 'nvim-tree/nvim-web-devicons' },

config = {
options = {
theme = 'auto',
section_separators = { '', '' },
component_separators = { '', '' },
},
}
}
}
8 changes: 8 additions & 0 deletions lua/custom/plugins/theme.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
return {
'rebelot/kanagawa.nvim',
lazy = false,
priority = 1000,
config = function()
vim.cmd("colorscheme kanagawa-wave")
end
}
5 changes: 5 additions & 0 deletions lua/custom/plugins/undotree.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
vim.keymap.set('n', '<leader><F5>', vim.cmd.UndotreeToggle, { desc = 'Open undo tree' })

return {
'mbbill/undotree',
}
7 changes: 4 additions & 3 deletions lua/kickstart/health.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@
--]]

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

if vim.version.cmp(vim.version(), { 0, 9, 4 }) >= 0 then
vim.health.ok(string.format("Neovim version is: '%s'", tostring(vim.version())))
vim.health.ok(string.format("Neovim version is: '%s'", verstr))
else
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", tostring(vim.version())))
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
end
end

Expand Down