diff --git a/README.md b/README.md index c9b9d84e87b..b6d19f49787 100644 --- a/README.md +++ b/README.md @@ -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:
Linux and Mac @@ -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. +
Adding autopairs @@ -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. + + diff --git a/init.lua b/init.lua index 3f53732864f..488dbb7c677 100644 --- a/init.lua +++ b/init.lua @@ -170,10 +170,10 @@ vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagn vim.keymap.set('t', '', '', { desc = 'Exit terminal mode' }) -- TIP: Disable arrow keys in normal mode --- vim.keymap.set('n', '', 'echo "Use h to move!!"') --- vim.keymap.set('n', '', 'echo "Use l to move!!"') --- vim.keymap.set('n', '', 'echo "Use k to move!!"') --- vim.keymap.set('n', '', 'echo "Use j to move!!"') +vim.keymap.set('n', '', 'echo "Use h to move!!"') +vim.keymap.set('n', '', 'echo "Use l to move!!"') +vim.keymap.set('n', '', 'echo "Use k to move!!"') +vim.keymap.set('n', '', 'echo "Use j to move!!"') -- Keybinds to make split navigation easier. -- Use CTRL+ to switch between windows @@ -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 @@ -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() @@ -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', @@ -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' } }, }, }, }, @@ -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', @@ -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 @@ -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` diff --git a/lua/custom/plugins/dap-python.lua b/lua/custom/plugins/dap-python.lua new file mode 100644 index 00000000000..53b09fbd4e6 --- /dev/null +++ b/lua/custom/plugins/dap-python.lua @@ -0,0 +1,5 @@ +return { + "mfussenegger/nvim-dap-python", + ft = "python", + lazy = false, +} \ No newline at end of file diff --git a/lua/custom/plugins/harpoon.lua b/lua/custom/plugins/harpoon.lua new file mode 100644 index 00000000000..d55740b06e2 --- /dev/null +++ b/lua/custom/plugins/harpoon.lua @@ -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('ja', function() + harpoon:list():append() + end, { desc = 'Append Current File' }) + map('e', function() + harpoon.ui:toggle_quick_menu(harpoon:list()) + end, { desc = 'Toggle Harpoon Quick Menu' }) + map('jj', function() + harpoon:list():select(1) + end, { desc = 'Select First Item in Harpoon List' }) + map('jk', function() + harpoon:list():select(2) + end, { desc = 'Select Second Item in Harpoon List' }) + map('jl', function() + harpoon:list():select(3) + end, { desc = 'Select Third Item in Harpoon List' }) + map('hl', function() + harpoon:list():select(4) + end, { desc = 'Select Fourth Item in Harpoon List' }) + map('jp', function() + harpoon:list():prev() + end, { desc = 'Move to Previous Item in Harpoon List' }) + map('jn', function() + harpoon:list():next() + end, { desc = 'Move to Next Item in Harpoon List' }) + end, +} diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index be0eb9d8d7a..6f6ed3f93a5 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -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 character in the file counts for +vim.opt.softtabstop = 4 + +-- Set the number of spaces that a 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', +} diff --git a/lua/custom/plugins/lualine.lua b/lua/custom/plugins/lualine.lua new file mode 100644 index 00000000000..1e43c9b5ec8 --- /dev/null +++ b/lua/custom/plugins/lualine.lua @@ -0,0 +1,14 @@ +return { + { + 'nvim-lualine/lualine.nvim', + dependencies = { 'nvim-tree/nvim-web-devicons' }, + + config = { + options = { + theme = 'auto', + section_separators = { '', '' }, + component_separators = { '', '' }, + }, + } + } +} \ No newline at end of file diff --git a/lua/custom/plugins/theme.lua b/lua/custom/plugins/theme.lua new file mode 100644 index 00000000000..8fc46a14579 --- /dev/null +++ b/lua/custom/plugins/theme.lua @@ -0,0 +1,8 @@ +return { + 'rebelot/kanagawa.nvim', + lazy = false, + priority = 1000, + config = function() + vim.cmd("colorscheme kanagawa-wave") + end +} \ No newline at end of file diff --git a/lua/custom/plugins/undotree.lua b/lua/custom/plugins/undotree.lua new file mode 100644 index 00000000000..3f19feab6a6 --- /dev/null +++ b/lua/custom/plugins/undotree.lua @@ -0,0 +1,5 @@ +vim.keymap.set('n', '', vim.cmd.UndotreeToggle, { desc = 'Open undo tree' }) + +return { + 'mbbill/undotree', +} diff --git a/lua/kickstart/health.lua b/lua/kickstart/health.lua index 957204e8dad..04df77b33e8 100644 --- a/lua/kickstart/health.lua +++ b/lua/kickstart/health.lua @@ -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