From 1fa7f0e61f2b302c3faedcb538844eace05f65e4 Mon Sep 17 00:00:00 2001 From: pcastr0 Date: Sun, 9 Feb 2025 05:24:47 +0800 Subject: [PATCH 1/7] init commit --- init.lua | 122 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 69 insertions(+), 53 deletions(-) diff --git a/init.lua b/init.lua index 4eae8e7d95a..b9b7028e31a 100644 --- a/init.lua +++ b/init.lua @@ -1,10 +1,10 @@ --[[ -===================================================================== -==================== READ THIS BEFORE CONTINUING ==================== -===================================================================== -======== .-----. ======== -======== .----------------------. | === | ======== + ===================================================================== + ==================== READ THIS BEFORE CONTINUING ==================== + ===================================================================== + ======== .-----. ======== + ======== .----------------------. | === | ======== ======== |.-""""""""""""""""""-.| |-----| ======== ======== || || | === | ======== ======== || KICKSTART.NVIM || |-----| ======== @@ -91,13 +91,14 @@ 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` -- NOTE: You can change these options as you wish! -- For more options, you can see `:help option-list` - +-- Relative line numbers +vim.wo.relativenumber = true -- Make line numbers default vim.opt.number = true -- You can also add relative line numbers, to help with jumping. @@ -158,7 +159,12 @@ vim.opt.scrolloff = 10 -- [[ Basic Keymaps ]] -- See `:help vim.keymap.set()` - +vim.keymap.set('n', 'pv', vim.cmd.Ex, { desc = 'Open Netrw Directory Listing' }) +vim.keymap.set('i', 'jj', '') +vim.keymap.set('i', 'kk', '') +vim.keymap.set('i', 'jk', '') +vim.keymap.set('n', 'B', '^') +vim.keymap.set('n', 'E', '$') -- Clear highlights on search when pressing in normal mode -- See `:help hlsearch` vim.keymap.set('n', '', 'nohlsearch') @@ -175,10 +181,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 @@ -227,6 +233,20 @@ vim.opt.rtp:prepend(lazypath) -- -- NOTE: Here is where you install your plugins. require('lazy').setup({ + { 'bluz71/vim-moonfly-colors', name = 'moonfly', lazy = false, priority = 1000 }, + + { + 'Zeioth/neon.nvim', + opts = { + transparent = true, + dim_inactive = false, + styles = { + comments = { italic = true }, + keywords = { italic = true }, + }, + }, + }, + -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link). 'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically @@ -447,22 +467,22 @@ require('lazy').setup({ opts = { library = { -- Load luvit types when the `vim.uv` word is found - { path = '${3rd}/luv/library', words = { 'vim%.uv' } }, + { path = 'luvit-meta/library', words = { 'vim%.uv' } }, }, }, }, + { 'Bilal2453/luvit-meta', lazy = true }, { -- Main LSP Configuration 'neovim/nvim-lspconfig', dependencies = { -- Automatically install LSPs and related tools to stdpath for Neovim - -- Mason must be loaded before its dependents so we need to set it up here. - -- NOTE: `opts = {}` is the same as calling `require('mason').setup({})` - { 'williamboman/mason.nvim', opts = {} }, + { 'williamboman/mason.nvim', config = true }, -- NOTE: Must be loaded before dependants 'williamboman/mason-lspconfig.nvim', 'WhoIsSethDaniel/mason-tool-installer.nvim', -- Useful status updates for LSP. + -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})` { 'j-hui/fidget.nvim', opts = {} }, -- Allows extra capabilities provided by nvim-cmp @@ -615,47 +635,44 @@ require('lazy').setup({ -- - capabilities (table): Override fields in capabilities. Can be used to disable certain LSP features. -- - settings (table): Override the default settings passed when initializing the server. -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/ - local servers = { - -- clangd = {}, - -- gopls = {}, - -- pyright = {}, - -- rust_analyzer = {}, - -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs - -- - -- Some languages (like typescript) have entire language plugins that can be useful: - -- https://github.com/pmizio/typescript-tools.nvim - -- - -- But for many setups, the LSP (`ts_ls`) will work just fine - -- ts_ls = {}, - -- + local servers = + { + -- clangd = {}, + -- gopls = {}, + -- pyright = {}, + -- rust_analyzer = {}, + -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs + -- + -- Some languages (like typescript) have entire language plugins that can be useful: + -- https://github.com/pmizio/typescript-tools.nvim + -- + -- But for many setups, the LSP (`ts_ls`) will work just fine + -- ts_ls = {}, + -- - lua_ls = { - -- cmd = { ... }, - -- filetypes = { ... }, - -- capabilities = {}, - settings = { - Lua = { - completion = { - callSnippet = 'Replace', + lua_ls = { + -- cmd = { ... }, + -- filetypes = { ... }, + -- capabilities = {}, + settings = { + Lua = { + completion = { + callSnippet = 'Replace', + }, + -- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings + -- diagnostics = { disable = { 'missing-fields' } }, }, - -- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings - -- diagnostics = { disable = { 'missing-fields' } }, }, }, }, - } + -- Ensure the servers and tools above are installed + -- To check the current status of installed tools and/or manually install + -- other tools, you can run + -- :Mason + -- + -- You can press `g?` for help in this menu. + require('mason').setup() - -- Ensure the servers and tools above are installed - -- - -- To check the current status of installed tools and/or manually install - -- other tools, you can run - -- :Mason - -- - -- You can press `g?` for help in this menu. - -- - -- `mason` had to be setup earlier: to configure its options see the - -- `dependencies` table for `nvim-lspconfig` above. - -- -- You can add other tools here that you want Mason to install -- for you, so that they are available from within Neovim. local ensure_installed = vim.tbl_keys(servers or {}) @@ -849,8 +866,7 @@ require('lazy').setup({ -- Load the colorscheme here. -- Like many other themes, this one has different styles, and you could load -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. - vim.cmd.colorscheme 'tokyonight-night' - + vim.cmd.colorscheme 'neon-netrunner-night' -- You can configure highlights by doing something like: vim.cmd.hi 'Comment gui=none' end, From 904432140577ef04f5dd9fbb71fb07ce99bb078f Mon Sep 17 00:00:00 2001 From: pcastr0 Date: Mon, 10 Feb 2025 15:35:06 +0800 Subject: [PATCH 2/7] basic configs --- init.lua | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/init.lua b/init.lua index b9b7028e31a..972628df607 100644 --- a/init.lua +++ b/init.lua @@ -190,10 +190,10 @@ vim.keymap.set('n', '', 'echo "Use j to move!!"') -- Use CTRL+ to switch between windows -- -- See `:help wincmd` for a list of all window commands -vim.keymap.set('n', '', '', { desc = 'Move focus to the left window' }) -vim.keymap.set('n', '', '', { desc = 'Move focus to the right window' }) -vim.keymap.set('n', '', '', { desc = 'Move focus to the lower window' }) -vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' }) +vim.keymap.set('n', 'H', '', { desc = 'Move focus to the left window' }) +vim.keymap.set('n', 'L', '', { desc = 'Move focus to the right window' }) +vim.keymap.set('n', 'J', '', { desc = 'Move focus to the lower window' }) +vim.keymap.set('n', 'K', '', { desc = 'Move focus to the upper window' }) -- [[ Basic Autocommands ]] -- See `:help lua-guide-autocommands` @@ -233,6 +233,7 @@ vim.opt.rtp:prepend(lazypath) -- -- NOTE: Here is where you install your plugins. require('lazy').setup({ + { 'bluz71/vim-moonfly-colors', name = 'moonfly', lazy = false, priority = 1000 }, { @@ -568,6 +569,8 @@ require('lazy').setup({ -- For example, in C this would take you to the header. map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration') + map('K', vim.lsp.buf.hover, 'Hover Documentation') + -- The following two autocommands are used to highlight references of the -- word under your cursor when your cursor rests there for a little while. -- See `:help CursorHold` for information about when this is executed @@ -647,8 +650,7 @@ require('lazy').setup({ -- https://github.com/pmizio/typescript-tools.nvim -- -- But for many setups, the LSP (`ts_ls`) will work just fine - -- ts_ls = {}, - -- + ts_ls = {}, lua_ls = { -- cmd = { ... }, @@ -866,7 +868,7 @@ require('lazy').setup({ -- Load the colorscheme here. -- Like many other themes, this one has different styles, and you could load -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. - vim.cmd.colorscheme 'neon-netrunner-night' + vim.cmd.colorscheme 'neon-cyberpunk-night' -- You can configure highlights by doing something like: vim.cmd.hi 'Comment gui=none' end, @@ -947,12 +949,12 @@ 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. From 682ade0553885656213faa1f38eaa0ffb6461a10 Mon Sep 17 00:00:00 2001 From: pcastr0 Date: Tue, 11 Feb 2025 12:32:34 +0800 Subject: [PATCH 3/7] change position of neo-tree --- lua/kickstart/plugins/neo-tree.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/kickstart/plugins/neo-tree.lua b/lua/kickstart/plugins/neo-tree.lua index bd4422695aa..d8521df8b83 100644 --- a/lua/kickstart/plugins/neo-tree.lua +++ b/lua/kickstart/plugins/neo-tree.lua @@ -11,7 +11,7 @@ return { }, cmd = 'Neotree', keys = { - { '\\', ':Neotree reveal', desc = 'NeoTree reveal', silent = true }, + { '\\', ':Neotree reveal right', desc = 'NeoTree reveal', silent = true }, }, opts = { filesystem = { From a650d1f4e29d9405c04e99c827b9389fc54e3cef Mon Sep 17 00:00:00 2001 From: pcastr0 Date: Thu, 27 Feb 2025 16:12:40 +0800 Subject: [PATCH 4/7] update colorschemes for default, remove mini.statusline --- init.lua | 58 ++++++++++++++++-------------- lua/kickstart/plugins/neo-tree.lua | 2 +- 2 files changed, 33 insertions(+), 27 deletions(-) diff --git a/init.lua b/init.lua index 972628df607..02600c42462 100644 --- a/init.lua +++ b/init.lua @@ -1,10 +1,10 @@ --[[ - ===================================================================== - ==================== READ THIS BEFORE CONTINUING ==================== - ===================================================================== - ======== .-----. ======== - ======== .----------------------. | === | ======== +===================================================================== +==================== READ THIS BEFORE CONTINUING ==================== +===================================================================== +======== .-----. ======== +======== .----------------------. | === | ======== ======== |.-""""""""""""""""""-.| |-----| ======== ======== || || | === | ======== ======== || KICKSTART.NVIM || |-----| ======== @@ -98,18 +98,17 @@ vim.g.have_nerd_font = true -- NOTE: You can change these options as you wish! -- For more options, you can see `:help option-list` -- Relative line numbers -vim.wo.relativenumber = true -- Make line numbers default 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' -- Don't show the mode, since it's already in the status line -vim.opt.showmode = false +vim.opt.showmode = true -- Sync clipboard between OS and Neovim. -- Schedule the setting after `UiEnter` because it can increase startup-time. @@ -145,6 +144,12 @@ vim.opt.splitbelow = true -- Sets how neovim will display certain whitespace characters in the editor. -- See `:help 'list'` -- and `:help 'listchars'` +vim.opt.smarttab = true +vim.opt.expandtab = true +vim.opt.tabstop = 2 +vim.opt.softtabstop = 2 +vim.opt.shiftwidth = 2 + vim.opt.list = true vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' } @@ -181,10 +186,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 @@ -797,9 +802,9 @@ require('lazy').setup({ -- No, but seriously. Please read `:help ins-completion`, it is really good! mapping = cmp.mapping.preset.insert { -- Select the [n]ext item - [''] = cmp.mapping.select_next_item(), - -- Select the [p]revious item - [''] = cmp.mapping.select_prev_item(), + -- [''] = cmp.mapping.select_next_item(), + -- -- Select the [p]revious item + -- [''] = cmp.mapping.select_prev_item(), -- Scroll the documentation window [b]ack / [f]orward [''] = cmp.mapping.scroll_docs(-4), @@ -808,13 +813,13 @@ require('lazy').setup({ -- Accept ([y]es) the completion. -- This will auto-import if your LSP supports it. -- This will expand snippets if the LSP sent a snippet. - [''] = cmp.mapping.confirm { select = true }, + -- [''] = cmp.mapping.confirm { select = true }, -- If you prefer more traditional completion keymaps, -- you can uncomment the following lines - --[''] = cmp.mapping.confirm { select = true }, - --[''] = cmp.mapping.select_next_item(), - --[''] = cmp.mapping.select_prev_item(), + [''] = cmp.mapping.confirm { select = true }, + [''] = cmp.mapping.select_next_item(), + [''] = cmp.mapping.select_prev_item(), -- Manually trigger a completion from nvim-cmp. -- Generally you don't need this, because nvim-cmp will display @@ -868,9 +873,10 @@ require('lazy').setup({ -- Load the colorscheme here. -- Like many other themes, this one has different styles, and you could load -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. - vim.cmd.colorscheme 'neon-cyberpunk-night' + vim.cmd.colorscheme 'default' -- You can configure highlights by doing something like: vim.cmd.hi 'Comment gui=none' + vim.cmd.hi 'Normal guibg=none' end, }, @@ -898,17 +904,17 @@ require('lazy').setup({ -- Simple and easy statusline. -- You could remove this setup call if you don't like it, -- and try some other statusline plugin - local statusline = require 'mini.statusline' + -- local statusline = require 'mini.statusline' -- set use_icons to true if you have a Nerd Font - statusline.setup { use_icons = vim.g.have_nerd_font } + -- statusline.setup { use_icons = vim.g.have_nerd_font } -- You can configure sections in the statusline by overriding their -- default behavior. For example, here we set the section for -- cursor location to LINE:COLUMN - ---@diagnostic disable-next-line: duplicate-set-field - statusline.section_location = function() - return '%2l:%-2v' - end + -- @diagnostic disable-next-line: duplicate-set-field + -- statusline.section_location = function() + -- return '%2l:%-2v' + -- end -- ... and there is more! -- Check out: https://github.com/echasnovski/mini.nvim diff --git a/lua/kickstart/plugins/neo-tree.lua b/lua/kickstart/plugins/neo-tree.lua index d8521df8b83..5a787e663e5 100644 --- a/lua/kickstart/plugins/neo-tree.lua +++ b/lua/kickstart/plugins/neo-tree.lua @@ -11,7 +11,7 @@ return { }, cmd = 'Neotree', keys = { - { '\\', ':Neotree reveal right', desc = 'NeoTree reveal', silent = true }, + { '\\', ':Neotree reveal ', desc = 'NeoTree reveal', silent = true }, }, opts = { filesystem = { From 0bea34346a8350c0dc62fe24309d38067b8c396b Mon Sep 17 00:00:00 2001 From: pcastr0 Date: Thu, 27 Feb 2025 23:10:41 +0800 Subject: [PATCH 5/7] delete comments --- .gitignore | 1 - init.lua | 126 +++++++------------------------------------------ lazy-lock.json | 41 ++++++++++++++++ lazyvim.json | 9 ++++ 4 files changed, 66 insertions(+), 111 deletions(-) create mode 100644 lazy-lock.json create mode 100644 lazyvim.json diff --git a/.gitignore b/.gitignore index 005b535b606..8a192cab54d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,3 @@ test.sh nvim spell/ -lazy-lock.json diff --git a/init.lua b/init.lua index 02600c42462..b28b4b96b12 100644 --- a/init.lua +++ b/init.lua @@ -1,89 +1,3 @@ ---[[ - -===================================================================== -==================== READ THIS BEFORE CONTINUING ==================== -===================================================================== -======== .-----. ======== -======== .----------------------. | === | ======== -======== |.-""""""""""""""""""-.| |-----| ======== -======== || || | === | ======== -======== || KICKSTART.NVIM || |-----| ======== -======== || || | === | ======== -======== || || |-----| ======== -======== ||:Tutor || |:::::| ======== -======== |'-..................-'| |____o| ======== -======== `"")----------------(""` ___________ ======== -======== /::::::::::| |::::::::::\ \ no mouse \ ======== -======== /:::========| |==hjkl==:::\ \ required \ ======== -======== '""""""""""""' '""""""""""""' '""""""""""' ======== -======== ======== -===================================================================== -===================================================================== - -What is Kickstart? - - Kickstart.nvim is *not* a distribution. - - Kickstart.nvim is a starting point for your own configuration. - The goal is that you can read every line of code, top-to-bottom, understand - what your configuration is doing, and modify it to suit your needs. - - Once you've done that, you can start exploring, configuring and tinkering to - make Neovim your own! That might mean leaving Kickstart just the way it is for a while - or immediately breaking it into modular pieces. It's up to you! - - If you don't know anything about Lua, I recommend taking some time to read through - a guide. One possible example which will only take 10-15 minutes: - - https://learnxinyminutes.com/docs/lua/ - - After understanding a bit more about Lua, you can use `:help lua-guide` as a - reference for how Neovim integrates Lua. - - :help lua-guide - - (or HTML version): https://neovim.io/doc/user/lua-guide.html - -Kickstart Guide: - - TODO: The very first thing you should do is to run the command `:Tutor` in Neovim. - - If you don't know what this means, type the following: - - - - : - - Tutor - - - - (If you already know the Neovim basics, you can skip this step.) - - Once you've completed that, you can continue working through **AND READING** the rest - of the kickstart init.lua. - - Next, run AND READ `:help`. - This will open up a help window with some basic information - about reading, navigating and searching the builtin help documentation. - - This should be the first place you go to look when you're stuck or confused - with something. It's one of my favorite Neovim features. - - MOST IMPORTANTLY, we provide a keymap "sh" to [s]earch the [h]elp documentation, - which is very useful when you're not exactly sure of what you're looking for. - - I have left several `:help X` comments throughout the init.lua - These are hints about where to find more information about the relevant settings, - plugins or Neovim features used in Kickstart. - - NOTE: Look for lines like this - - Throughout the file. These are for you, the reader, to help you understand what is happening. - Feel free to delete them once you know what you're doing, but they should serve as a guide - for when you are first encountering a few different constructs in your Neovim config. - -If you experience any errors while trying to install kickstart, run `:checkhealth` for more info. - -I hope you enjoy your Neovim journey, -- TJ - -P.S. You can delete this when you're done too. It's your config now! :) ---]] - -- Set as the leader key -- See `:help mapleader` -- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used) @@ -95,15 +9,9 @@ vim.g.have_nerd_font = true -- [[ Setting options ]] -- See `:help vim.opt` --- NOTE: You can change these options as you wish! --- For more options, you can see `:help option-list` --- Relative line numbers --- Make line numbers default 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 - -- Enable mouse mode, can be useful for resizing splits for example! vim.opt.mouse = 'a' @@ -111,9 +19,6 @@ vim.opt.mouse = 'a' vim.opt.showmode = true -- Sync clipboard between OS and Neovim. --- Schedule the setting after `UiEnter` because it can increase startup-time. --- Remove this option if you want your OS clipboard to remain independent. --- See `:help 'clipboard'` vim.schedule(function() vim.opt.clipboard = 'unnamedplus' end) @@ -144,15 +49,16 @@ vim.opt.splitbelow = true -- Sets how neovim will display certain whitespace characters in the editor. -- See `:help 'list'` -- and `:help 'listchars'` +vim.opt.list = true +vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' } + +-- Set tabs into 2 spaces vim.opt.smarttab = true vim.opt.expandtab = true vim.opt.tabstop = 2 vim.opt.softtabstop = 2 vim.opt.shiftwidth = 2 -vim.opt.list = true -vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' } - -- Preview substitutions live, as you type! vim.opt.inccommand = 'split' @@ -170,8 +76,8 @@ vim.keymap.set('i', 'kk', '') vim.keymap.set('i', 'jk', '') vim.keymap.set('n', 'B', '^') vim.keymap.set('n', 'E', '$') + -- Clear highlights on search when pressing in normal mode --- See `:help hlsearch` vim.keymap.set('n', '', 'nohlsearch') -- Diagnostic keymaps @@ -185,15 +91,6 @@ vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagn -- or just use to exit terminal mode 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!!"') - --- Keybinds to make split navigation easier. --- Use CTRL+ to switch between windows --- -- See `:help wincmd` for a list of all window commands vim.keymap.set('n', 'H', '', { desc = 'Move focus to the left window' }) vim.keymap.set('n', 'L', '', { desc = 'Move focus to the right window' }) @@ -204,7 +101,6 @@ vim.keymap.set('n', 'K', '', { desc = 'Move focus to the upper window' -- See `:help lua-guide-autocommands` -- Highlight when yanking (copying) text --- Try it with `yap` in normal mode -- See `:help vim.highlight.on_yank()` vim.api.nvim_create_autocmd('TextYankPost', { desc = 'Highlight when yanking (copying) text', @@ -238,6 +134,16 @@ vim.opt.rtp:prepend(lazypath) -- -- NOTE: Here is where you install your plugins. require('lazy').setup({ + { + 'MeanderingProgrammer/render-markdown.nvim', + dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' }, -- if you use the mini.nvim suite + -- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.icons' }, -- if you use standalone mini plugins + -- dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons + ---@module 'render-markdown' + ---@type render.md.UserConfig + opts = {}, + }, + -- COLORSCHEME { 'bluz71/vim-moonfly-colors', name = 'moonfly', lazy = false, priority = 1000 }, @@ -876,7 +782,7 @@ require('lazy').setup({ vim.cmd.colorscheme 'default' -- You can configure highlights by doing something like: vim.cmd.hi 'Comment gui=none' - vim.cmd.hi 'Normal guibg=none' + vim.cmd.hi 'Normal ctermbg=none guibg=none' end, }, diff --git a/lazy-lock.json b/lazy-lock.json new file mode 100644 index 00000000000..57eb73c7519 --- /dev/null +++ b/lazy-lock.json @@ -0,0 +1,41 @@ +{ + "LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" }, + "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, + "conform.nvim": { "branch": "master", "commit": "a6f5bdb78caa305496357d17e962bbc4c0b392e2" }, + "fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" }, + "gitsigns.nvim": { "branch": "main", "commit": "4c40357994f386e72be92a46f41fc1664c84c87d" }, + "indent-blankline.nvim": { "branch": "master", "commit": "e10626f7fcd51ccd56d7ffc00883ba7e0aa28f78" }, + "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, + "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, + "luvit-meta": { "branch": "main", "commit": "1df30b60b1b4aecfebc785aa98943db6c6989716" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, + "mason-nvim-dap.nvim": { "branch": "main", "commit": "09220b99d63d5363f219daa2785242ee5fddba7f" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "5639d58a3d11ff7c05c8e31e159bfedae55d7961" }, + "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, + "mini.nvim": { "branch": "main", "commit": "307221b90376b68fc7e007e9315836370e9efb8f" }, + "moonfly": { "branch": "master", "commit": "b2c58a0c6eb3ee091d5cc13b8f4f6e6fba8a9c7a" }, + "neo-tree.nvim": { "branch": "main", "commit": "e96fd85bf18bc345dab332b345098fa5460dffac" }, + "neon.nvim": { "branch": "main", "commit": "50537d23b2ca3b482b95e572b86b26a699ab2ce4" }, + "nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" }, + "nvim-autopairs": { "branch": "master", "commit": "68f0e5c3dab23261a945272032ee6700af86227a" }, + "nvim-cmp": { "branch": "main", "commit": "c27370703e798666486e3064b64d59eaf4bdc6d5" }, + "nvim-dap": { "branch": "master", "commit": "379cf26e9c457b66a0152cd5d018418c03720d47" }, + "nvim-dap-go": { "branch": "main", "commit": "8763ced35b19c8dc526e04a70ab07c34e11ad064" }, + "nvim-dap-ui": { "branch": "master", "commit": "bc81f8d3440aede116f821114547a476b082b319" }, + "nvim-lint": { "branch": "master", "commit": "6e9dd545a1af204c4022a8fcd99727ea41ffdcc8" }, + "nvim-lspconfig": { "branch": "master", "commit": "919f83ef8169d11eabd921a4cbda4fc1ba12f123" }, + "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, + "nvim-treesitter": { "branch": "master", "commit": "1adcd5711929e44d1bc9e59fbf7d94656cf6d389" }, + "nvim-web-devicons": { "branch": "master", "commit": "ab4cfee554e501f497bce0856788d43cf2eb93d7" }, + "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, + "render-markdown.nvim": { "branch": "main", "commit": "03e6b3f467579a969930562ee18445ebb870ab5a" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "2a5ceff981501cff8f46871d5402cd3378a8ab6a" }, + "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, + "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, + "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, + "tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" }, + "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }, + "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } +} diff --git a/lazyvim.json b/lazyvim.json new file mode 100644 index 00000000000..a28f5eb93ba --- /dev/null +++ b/lazyvim.json @@ -0,0 +1,9 @@ +{ + "extras": [ + + ], + "news": { + "NEWS.md": "10960" + }, + "version": 8 +} \ No newline at end of file From d9b623edbe6ee61236fc0731da025c4e4535933c Mon Sep 17 00:00:00 2001 From: pcastr0 Date: Sat, 22 Mar 2025 06:20:24 +0800 Subject: [PATCH 6/7] Add easymotion/hop.nvim plugin and add keymaps --- init.lua | 37 ++++++++++++++++++++++++++++++++++--- lazy-lock.json | 34 +++++++++++++++++----------------- 2 files changed, 51 insertions(+), 20 deletions(-) diff --git a/init.lua b/init.lua index b28b4b96b12..34d1a05d5f3 100644 --- a/init.lua +++ b/init.lua @@ -77,6 +77,28 @@ vim.keymap.set('i', 'jk', '') vim.keymap.set('n', 'B', '^') vim.keymap.set('n', 'E', '$') +-- Easymotion/Hop.nvim Keymaps +-- +-- normal mode (easymotion-like) +vim.api.nvim_set_keymap('n', 'b', 'HopWordBC', { noremap = true }) +vim.api.nvim_set_keymap('n', 'w', 'HopWordAC', { noremap = true }) +vim.api.nvim_set_keymap('n', 'j', 'HopLineAC', { noremap = true }) +vim.api.nvim_set_keymap('n', 'k', 'HopLineBC', { noremap = true }) + +-- visual mode (easymotion-like) +vim.api.nvim_set_keymap('v', 'w', 'HopWordAC', { noremap = true }) +vim.api.nvim_set_keymap('v', 'b', 'HopWordBC', { noremap = true }) +vim.api.nvim_set_keymap('v', 'j', 'HopLineAC', { noremap = true }) +vim.api.nvim_set_keymap('v', 'k', 'HopLineBC', { noremap = true }) + +-- normal mode (sneak-like) +vim.api.nvim_set_keymap('n', 's', 'HopChar2AC', { noremap = false }) +vim.api.nvim_set_keymap('n', 'S', 'HopChar2BC', { noremap = false }) + +-- visual mode (sneak-like) +vim.api.nvim_set_keymap('v', 's', 'HopChar2AC', { noremap = false }) +vim.api.nvim_set_keymap('v', 'S', 'HopChar2BC', { noremap = false }) + -- Clear highlights on search when pressing in normal mode vim.keymap.set('n', '', 'nohlsearch') @@ -134,6 +156,15 @@ vim.opt.rtp:prepend(lazypath) -- -- NOTE: Here is where you install your plugins. require('lazy').setup({ + + { + 'smoka7/hop.nvim', + version = '*', + opts = { + keys = 'etovxqpdygfblzhckisuran', + }, + }, + { 'MeanderingProgrammer/render-markdown.nvim', dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' }, -- if you use the mini.nvim suite @@ -143,6 +174,7 @@ require('lazy').setup({ ---@type render.md.UserConfig opts = {}, }, + -- COLORSCHEME { 'bluz71/vim-moonfly-colors', name = 'moonfly', lazy = false, priority = 1000 }, @@ -343,7 +375,7 @@ require('lazy').setup({ vim.keymap.set('n', 'sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' }) vim.keymap.set('n', 'sr', builtin.resume, { desc = '[S]earch [R]esume' }) vim.keymap.set('n', 's.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' }) - vim.keymap.set('n', '', builtin.buffers, { desc = '[ ] Find existing buffers' }) + vim.keymap.set('n', 'eb', builtin.buffers, { desc = '[ ] Find existing buffers' }) -- Slightly advanced example of overriding default behavior and theme vim.keymap.set('n', '/', function() @@ -779,10 +811,9 @@ require('lazy').setup({ -- Load the colorscheme here. -- Like many other themes, this one has different styles, and you could load -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. - vim.cmd.colorscheme 'default' + vim.cmd.colorscheme 'neon-cyberpunk-night' -- You can configure highlights by doing something like: vim.cmd.hi 'Comment gui=none' - vim.cmd.hi 'Normal ctermbg=none guibg=none' end, }, diff --git a/lazy-lock.json b/lazy-lock.json index 57eb73c7519..7ff2f75ecda 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -3,35 +3,35 @@ "cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, - "conform.nvim": { "branch": "master", "commit": "a6f5bdb78caa305496357d17e962bbc4c0b392e2" }, + "conform.nvim": { "branch": "master", "commit": "f9ef25a7ef00267b7d13bfc00b0dea22d78702d5" }, "fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" }, - "gitsigns.nvim": { "branch": "main", "commit": "4c40357994f386e72be92a46f41fc1664c84c87d" }, - "indent-blankline.nvim": { "branch": "master", "commit": "e10626f7fcd51ccd56d7ffc00883ba7e0aa28f78" }, + "gitsigns.nvim": { "branch": "main", "commit": "7010000889bfb6c26065e0b0f7f1e6aa9163edd9" }, + "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, "luvit-meta": { "branch": "main", "commit": "1df30b60b1b4aecfebc785aa98943db6c6989716" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, - "mason-nvim-dap.nvim": { "branch": "main", "commit": "09220b99d63d5363f219daa2785242ee5fddba7f" }, + "mason-nvim-dap.nvim": { "branch": "main", "commit": "444aad7977ee713a4049e9d1dd9b377967d67a4c" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "5639d58a3d11ff7c05c8e31e159bfedae55d7961" }, "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, - "mini.nvim": { "branch": "main", "commit": "307221b90376b68fc7e007e9315836370e9efb8f" }, - "moonfly": { "branch": "master", "commit": "b2c58a0c6eb3ee091d5cc13b8f4f6e6fba8a9c7a" }, - "neo-tree.nvim": { "branch": "main", "commit": "e96fd85bf18bc345dab332b345098fa5460dffac" }, + "mini.nvim": { "branch": "main", "commit": "9425f0e30e8d426a8c918c417df76ebf2d6bfc99" }, + "moonfly": { "branch": "master", "commit": "0da394728aa3869b3a756ae7f8b308b84cb715a7" }, + "neo-tree.nvim": { "branch": "main", "commit": "9b5d67119c46e3262ffe1508fe6d8540b79ad75d" }, "neon.nvim": { "branch": "main", "commit": "50537d23b2ca3b482b95e572b86b26a699ab2ce4" }, - "nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" }, - "nvim-autopairs": { "branch": "master", "commit": "68f0e5c3dab23261a945272032ee6700af86227a" }, - "nvim-cmp": { "branch": "main", "commit": "c27370703e798666486e3064b64d59eaf4bdc6d5" }, - "nvim-dap": { "branch": "master", "commit": "379cf26e9c457b66a0152cd5d018418c03720d47" }, + "nui.nvim": { "branch": "main", "commit": "8d3bce9764e627b62b07424e0df77f680d47ffdb" }, + "nvim-autopairs": { "branch": "master", "commit": "6522027785b305269fa17088395dfc0f456cedd2" }, + "nvim-cmp": { "branch": "main", "commit": "1e1900b0769324a9675ef85b38f99cca29e203b3" }, + "nvim-dap": { "branch": "master", "commit": "6a5bba0ddea5d419a783e170c20988046376090d" }, "nvim-dap-go": { "branch": "main", "commit": "8763ced35b19c8dc526e04a70ab07c34e11ad064" }, "nvim-dap-ui": { "branch": "master", "commit": "bc81f8d3440aede116f821114547a476b082b319" }, - "nvim-lint": { "branch": "master", "commit": "6e9dd545a1af204c4022a8fcd99727ea41ffdcc8" }, - "nvim-lspconfig": { "branch": "master", "commit": "919f83ef8169d11eabd921a4cbda4fc1ba12f123" }, + "nvim-lint": { "branch": "master", "commit": "936197073214c26a347fb933c9459c8766376b23" }, + "nvim-lspconfig": { "branch": "master", "commit": "fb733ac734249ccf293e5c8018981d4d8f59fa8f" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, - "nvim-treesitter": { "branch": "master", "commit": "1adcd5711929e44d1bc9e59fbf7d94656cf6d389" }, - "nvim-web-devicons": { "branch": "master", "commit": "ab4cfee554e501f497bce0856788d43cf2eb93d7" }, + "nvim-treesitter": { "branch": "master", "commit": "5f38dffb6a07669a678f073bfe0f62b1a020dffc" }, + "nvim-web-devicons": { "branch": "master", "commit": "4c3a5848ee0b09ecdea73adcd2a689190aeb728c" }, "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, - "render-markdown.nvim": { "branch": "main", "commit": "03e6b3f467579a969930562ee18445ebb870ab5a" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "2a5ceff981501cff8f46871d5402cd3378a8ab6a" }, + "render-markdown.nvim": { "branch": "main", "commit": "62d6681332365cfddbe916c888752834d9f7ad0c" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, From 6d4349f62f0fa6800025a12e7ed08c6012e51bea Mon Sep 17 00:00:00 2001 From: Patrick Castro Date: Tue, 1 Apr 2025 17:18:05 +0800 Subject: [PATCH 7/7] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index aa5f4fc8f1e..e57e9bac0a8 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ too - it's ignored in the kickstart repo to make maintenance easier, but it's
Linux and Mac ```sh -git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim +git clone git@github.com:pcastr0/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim ```
@@ -81,13 +81,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 git@github.com:pcastr0/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 git@github.com:pcastr0/kickstart.nvim.git "${env:LOCALAPPDATA}\nvim" ```