1- --[[
2-
3- =====================================================================
4- ==================== READ THIS BEFORE CONTINUING ====================
5- =====================================================================
6- ======== .-----. ========
7- ======== .----------------------. | === | ========
8- ======== |.-""""""""""""""""""-.| |-----| ========
9- ======== || || | === | ========
10- ======== || KICKSTART.NVIM || |-----| ========
11- ======== || || | === | ========
12- ======== || || |-----| ========
13- ======== ||:Tutor || |:::::| ========
14- ======== |'-..................-'| |____o| ========
15- ======== `"")----------------(""` ___________ ========
16- ======== /::::::::::| |::::::::::\ \ no mouse \ ========
17- ======== /:::========| |==hjkl==:::\ \ required \ ========
18- ======== '""""""""""""' '""""""""""""' '""""""""""' ========
19- ======== ========
20- =====================================================================
21- =====================================================================
22-
23- What is Kickstart?
24-
25- Kickstart.nvim is *not* a distribution.
26-
27- Kickstart.nvim is a starting point for your own configuration.
28- The goal is that you can read every line of code, top-to-bottom, understand
29- what your configuration is doing, and modify it to suit your needs.
30-
31- Once you've done that, you can start exploring, configuring and tinkering to
32- make Neovim your own! That might mean leaving Kickstart just the way it is for a while
33- or immediately breaking it into modular pieces. It's up to you!
34-
35- If you don't know anything about Lua, I recommend taking some time to read through
36- a guide. One possible example which will only take 10-15 minutes:
37- - https://learnxinyminutes.com/docs/lua/
38-
39- After understanding a bit more about Lua, you can use `:help lua-guide` as a
40- reference for how Neovim integrates Lua.
41- - :help lua-guide
42- - (or HTML version): https://neovim.io/doc/user/lua-guide.html
43-
44- Kickstart Guide:
45-
46- TODO: The very first thing you should do is to run the command `:Tutor` in Neovim.
47-
48- If you don't know what this means, type the following:
49- - <escape key>
50- - :
51- - Tutor
52- - <enter key>
53-
54- (If you already know the Neovim basics, you can skip this step.)
55-
56- Once you've completed that, you can continue working through **AND READING** the rest
57- of the kickstart init.lua.
58-
59- Next, run AND READ `:help`.
60- This will open up a help window with some basic information
61- about reading, navigating and searching the builtin help documentation.
62-
63- This should be the first place you go to look when you're stuck or confused
64- with something. It's one of my favorite Neovim features.
65-
66- MOST IMPORTANTLY, we provide a keymap "<space>sh" to [s]earch the [h]elp documentation,
67- which is very useful when you're not exactly sure of what you're looking for.
68-
69- I have left several `:help X` comments throughout the init.lua
70- These are hints about where to find more information about the relevant settings,
71- plugins or Neovim features used in Kickstart.
72-
73- NOTE: Look for lines like this
74-
75- Throughout the file. These are for you, the reader, to help you understand what is happening.
76- Feel free to delete them once you know what you're doing, but they should serve as a guide
77- for when you are first encountering a few different constructs in your Neovim config.
78-
79- If you experience any errors while trying to install kickstart, run `:checkhealth` for more info.
80-
81- I hope you enjoy your Neovim journey,
82- - TJ
83-
84- P.S. You can delete this when you're done too. It's your config now! :)
85- --]]
86-
87- -- Set <space> as the leader key
88- -- See `:help mapleader`
891-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
902vim .g .mapleader = ' '
913vim .g .maplocalleader = ' '
924
935-- Set to true if you have a Nerd Font installed and selected in the terminal
94- vim .g .have_nerd_font = false
6+ vim .g .have_nerd_font = true
957
968-- [[ Setting options ]]
979-- See `:help vim.opt`
@@ -102,7 +14,7 @@ vim.g.have_nerd_font = false
10214vim .opt .number = true
10315-- You can also add relative line numbers, to help with jumping.
10416-- Experiment for yourself to see if you like it!
105- -- vim.opt.relativenumber = true
17+ vim .opt .relativenumber = true
10618
10719-- Enable mouse mode, can be useful for resizing splits for example!
10820vim .opt .mouse = ' a'
@@ -166,6 +78,8 @@ vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous [D]
16678vim .keymap .set (' n' , ' ]d' , vim .diagnostic .goto_next , { desc = ' Go to next [D]iagnostic message' })
16779vim .keymap .set (' n' , ' <leader>e' , vim .diagnostic .open_float , { desc = ' Show diagnostic [E]rror messages' })
16880vim .keymap .set (' n' , ' <leader>q' , vim .diagnostic .setloclist , { desc = ' Open diagnostic [Q]uickfix list' })
81+ vim .keymap .set (' n' , ' <C-j>' , ' <cmd>cnext "Move to next Quicklist item"<CR>' )
82+ vim .keymap .set (' n' , ' <C-k>' , ' <cmd>cprev "Move to previous Quicklist item"<CR>' )
16983
17084-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
17185-- for people to discover. Otherwise, you normally need to press <C-\><C-n>, which
@@ -176,19 +90,21 @@ vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagn
17690vim .keymap .set (' t' , ' <Esc><Esc>' , ' <C-\\ ><C-n>' , { desc = ' Exit terminal mode' })
17791
17892-- TIP: Disable arrow keys in normal mode
179- -- vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
180- -- vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
181- -- vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
182- -- vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
93+ vim .keymap .set (' n' , ' <left>' , ' <cmd>echo "Use h to move!!"<CR>' )
94+ vim .keymap .set (' n' , ' <right>' , ' <cmd>echo "Use l to move!!"<CR>' )
95+ vim .keymap .set (' n' , ' <up>' , ' <cmd>echo "Use k to move!!"<CR>' )
96+ vim .keymap .set (' n' , ' <down>' , ' <cmd>echo "Use j to move!!"<CR>' )
97+
98+ vim .keymap .set (' i' , ' jk' , ' <Esc>' )
18399
184100-- Keybinds to make split navigation easier.
185101-- Use CTRL+<hjkl> to switch between windows
186102--
187103-- See `:help wincmd` for a list of all window commands
188104vim .keymap .set (' n' , ' <C-h>' , ' <C-w><C-h>' , { desc = ' Move focus to the left window' })
189105vim .keymap .set (' n' , ' <C-l>' , ' <C-w><C-l>' , { desc = ' Move focus to the right window' })
190- vim .keymap .set (' n' , ' <C-j>' , ' <C-w><C-j>' , { desc = ' Move focus to the lower window' })
191- vim .keymap .set (' n' , ' <C-k>' , ' <C-w><C-k>' , { desc = ' Move focus to the upper window' })
106+ -- vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
107+ -- vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
192108
193109-- [[ Basic Autocommands ]]
194110-- See `:help lua-guide-autocommands`
@@ -227,19 +143,71 @@ vim.opt.rtp:prepend(lazypath)
227143require (' lazy' ).setup ({
228144 -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
229145 ' tpope/vim-sleuth' , -- Detect tabstop and shiftwidth automatically
230-
231- -- NOTE: Plugins can also be added by using a table,
146+ ' rktjmp/lush.nvim' , -- Theme development
147+ { dir = ' /home/rrrodzilla/Projects/nvim_themes/quasar' , lazy = true },
148+ { ' rust-lang/rust.vim' },
149+ {
150+ ' mrcjkb/rustaceanvim' ,
151+ version = ' ^3' ,
152+ ft = { ' rust' },
153+ },
154+ -- note: plugins can also be added by using a table,
232155 -- with the first argument being the link and the following
233156 -- keys can be used to configure plugin behavior/loading/etc.
234157 --
235- -- Use `opts = {}` to force a plugin to be loaded.
158+ -- use `opts = {}` to force a plugin to be loaded.
236159 --
237- -- This is equivalent to:
160+ -- this is equivalent to:
238161 -- require('Comment').setup({})
239162
240163 -- "gc" to comment visual regions/lines
241164 { ' numToStr/Comment.nvim' , opts = {} },
242-
165+ {
166+ ' puremourning/vimspector' ,
167+ config = function () end ,
168+ opts = {},
169+ },
170+ {
171+ ' catppuccin/nvim' ,
172+ name = ' catppuccin' ,
173+ opts = {
174+ term_colors = true ,
175+ transparent_background = false ,
176+ color_overrides = {
177+ all = {
178+ base = ' #191919' ,
179+ text = ' #EEEEEE' ,
180+ overlay1 = ' #222222' ,
181+ overlay2 = ' #853A2D' ,
182+ surface1 = ' #484848' ,
183+ surface0 = ' #484848' ,
184+ muave = ' #B1A9FF' ,
185+ green = ' #71D083' ,
186+ red = ' #E5484D' ,
187+ pink = ' #D6409F' ,
188+ peach = ' #FF977D' ,
189+ sky = ' #7CE2FE' ,
190+ blue = ' #0090FF' ,
191+ maroon = ' #E54666' ,
192+ lavender = ' #BAA7FF' ,
193+ yellow = ' #FFC53D' ,
194+ teal = ' #86EAD4' ,
195+ cursor_line = ' #222222' ,
196+ line_numbers = ' #FF0000' ,
197+ },
198+ },
199+ integrations = {
200+ telescope = {
201+ enabled = true ,
202+ style = ' nvchad' ,
203+ },
204+ dropbar = {
205+ enabled = true ,
206+ color_mode = true ,
207+ },
208+ },
209+ },
210+ },
243211 -- Here is a more advanced example where we pass configuration
244212 -- options to `gitsigns.nvim`. This is equivalent to the following Lua:
245213 -- require('gitsigns').setup({ ... })
@@ -375,6 +343,7 @@ require('lazy').setup({
375343 vim .keymap .set (' n' , ' <leader>sh' , builtin .help_tags , { desc = ' [S]earch [H]elp' })
376344 vim .keymap .set (' n' , ' <leader>sk' , builtin .keymaps , { desc = ' [S]earch [K]eymaps' })
377345 vim .keymap .set (' n' , ' <leader>sf' , builtin .find_files , { desc = ' [S]earch [F]iles' })
346+ vim .keymap .set (' n' , ' <leader>sp' , builtin .git_files , { desc = ' [S]earch [P]Git Files' })
378347 vim .keymap .set (' n' , ' <leader>ss' , builtin .builtin , { desc = ' [S]earch [S]elect Telescope' })
379348 vim .keymap .set (' n' , ' <leader>sw' , builtin .grep_string , { desc = ' [S]earch current [W]ord' })
380349 vim .keymap .set (' n' , ' <leader>sg' , builtin .live_grep , { desc = ' [S]earch by [G]rep' })
@@ -567,8 +536,8 @@ require('lazy').setup({
567536 local servers = {
568537 -- clangd = {},
569538 -- gopls = {},
570- -- pyright = {},
571- -- rust_analyzer = {},
539+ pyright = {},
540+ -- rust_analyzer = {},
572541 -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
573542 --
574543 -- Some languages (like typescript) have entire language plugins that can be useful:
@@ -729,7 +698,7 @@ require('lazy').setup({
729698 -- Accept ([y]es) the completion.
730699 -- This will auto-import if your LSP supports it.
731700 -- This will expand snippets if the LSP sent a snippet.
732- [' <C-y >' ] = cmp .mapping .confirm { select = true },
701+ [' <CR >' ] = cmp .mapping .confirm { select = true },
733702
734703 -- If you prefer more traditional completion keymaps,
735704 -- you can uncomment the following lines
@@ -778,13 +747,13 @@ require('lazy').setup({
778747 -- change the command in the config to whatever the name of that colorscheme is.
779748 --
780749 -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
781- ' folke/tokyonight.nvim ' ,
750+ ' catppuccin ' ,
782751 priority = 1000 , -- Make sure to load this before all the other start plugins.
783752 init = function ()
784753 -- Load the colorscheme here.
785754 -- Like many other themes, this one has different styles, and you could load
786755 -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
787- vim .cmd .colorscheme ' tokyonight-night '
756+ vim .cmd .colorscheme ' catppuccin-mocha '
788757
789758 -- You can configure highlights by doing something like:
790759 vim .cmd .hi ' Comment gui=none'
@@ -835,15 +804,15 @@ require('lazy').setup({
835804 ' nvim-treesitter/nvim-treesitter' ,
836805 build = ' :TSUpdate' ,
837806 opts = {
838- ensure_installed = { ' bash' , ' c' , ' html' , ' lua' , ' luadoc' , ' markdown' , ' vim' , ' vimdoc' },
807+ ensure_installed = { ' bash' , ' toml ' , ' c' , ' html' , ' lua' , ' luadoc' , ' markdown' , ' vim' , ' vimdoc' , ' rust ' },
839808 -- Autoinstall languages that are not installed
840809 auto_install = true ,
841810 highlight = {
842811 enable = true ,
843812 -- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules.
844813 -- If you are experiencing weird indenting issues, add the language to
845814 -- the list of additional_vim_regex_highlighting and disabled languages for indent.
846- additional_vim_regex_highlighting = { ' ruby ' },
815+ additional_vim_regex_highlighting = { false },
847816 },
848817 indent = { enable = true , disable = { ' ruby' } },
849818 },
@@ -874,7 +843,7 @@ require('lazy').setup({
874843 -- Uncomment any of the lines below to enable them (you will need to restart nvim).
875844 --
876845 -- require 'kickstart.plugins.debug',
877- -- require 'kickstart.plugins.indent_line',
846+ -- require 'kickstart.plugins.indent_line',
878847 -- require 'kickstart.plugins.lint',
879848 -- require 'kickstart.plugins.autopairs',
880849 -- require 'kickstart.plugins.neo-tree',
@@ -907,6 +876,34 @@ require('lazy').setup({
907876 },
908877 },
909878})
910-
879+ local function fetch_highlight_groups ()
880+ local output = vim .fn .execute ' highlight'
881+ local lines = {}
882+ for line in output :gmatch ' [^\r\n ]+' do
883+ table.insert (lines , line ):
884+ end
885+ return lines
886+ end
887+ local function search_highlight_groups ()
888+ local results = fetch_highlight_groups ()
889+ require (' telescope.pickers' )
890+ .new ({}, {
891+ prompt_title = ' Highlight Groups' ,
892+ finder = require (' telescope.finders' ).new_table {
893+ results = results ,
894+ entry_maker = function (entry )
895+ return {
896+ value = entry ,
897+ display = entry ,
898+ ordinal = entry ,
899+ }
900+ end ,
901+ },
902+ sorter = require (' telescope.sorters' ).get_generic_fuzzy_sorter (),
903+ })
904+ :find ()
905+ end
906+ -- vim.api.nvim_create_user_command('TelescopeHi', search_highlight_groups, {})
911907-- The line beneath this is called `modeline`. See `:help modeline`
912- -- vim: ts=2 sts=2 sw=2 et
908+
909+ -- vim: ts=2 sts=2 sw=2 et
0 commit comments