diff options
-rw-r--r-- | nvim.lua | 99 |
1 files changed, 75 insertions, 24 deletions
@@ -3,39 +3,85 @@ | |||
3 | ===================================================================== | 3 | ===================================================================== |
4 | ==================== READ THIS BEFORE CONTINUING ==================== | 4 | ==================== READ THIS BEFORE CONTINUING ==================== |
5 | ===================================================================== | 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 | ===================================================================== | ||
6 | 22 | ||
7 | Kickstart.nvim is *not* a distribution. | 23 | What is Kickstart? |
8 | |||
9 | Kickstart.nvim is a template for your own configuration. | ||
10 | The goal is that you can read every line of code, top-to-bottom, understand | ||
11 | what your configuration is doing, and modify it to suit your needs. | ||
12 | 24 | ||
13 | Once you've done that, you should start exploring, configuring and tinkering to | 25 | Kickstart.nvim is *not* a distribution. |
14 | explore Neovim! | ||
15 | 26 | ||
16 | If you don't know anything about Lua, I recommend taking some time to read through | 27 | Kickstart.nvim is a starting point for your own configuration. |
17 | a guide. One possible example: | 28 | The goal is that you can read every line of code, top-to-bottom, understand |
18 | - https://learnxinyminutes.com/docs/lua/ | 29 | what your configuration is doing, and modify it to suit your needs. |
19 | 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! | ||
20 | 34 | ||
21 | And then you can explore or search through `:help lua-guide` | 35 | If you don't know anything about Lua, I recommend taking some time to read through |
22 | - https://neovim.io/doc/user/lua-guide.html | 36 | a guide. One possible example which will only take 10-15 minutes: |
37 | - https://learnxinyminutes.com/docs/lua/ | ||
23 | 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 | ||
24 | 43 | ||
25 | Kickstart Guide: | 44 | Kickstart Guide: |
26 | 45 | ||
27 | I have left several `:help X` comments throughout the init.lua | 46 | TODO: The very first thing you should do is to run the command `:Tutor` in Neovim. |
28 | You should run that command and read that help section for more information. | 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. | ||
29 | 65 | ||
30 | In addition, I have some `NOTE:` items throughout the file. | 66 | MOST IMPORTANTLY, we provide a keymap "<space>sh" to [s]earch the [h]elp documentation, |
31 | These are for you, the reader to help understand what is happening. Feel free to delete | 67 | which is very useful when you're not exactly sure of what you're looking for. |
32 | them once you know what you're doing, but they should serve as a guide for when you | 68 | |
33 | are first encountering a few different constructs in your nvim config. | 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. | ||
34 | 80 | ||
35 | I hope you enjoy your Neovim journey, | 81 | I hope you enjoy your Neovim journey, |
36 | - TJ | 82 | - TJ |
37 | 83 | ||
38 | P.S. You can delete this when you're done too. It's your config now :) | 84 | P.S. You can delete this when you're done too. It's your config now! :) |
39 | --]] | 85 | --]] |
40 | 86 | ||
41 | -- Install package manager | 87 | -- Install package manager |
@@ -156,7 +202,8 @@ require('lazy').setup({ | |||
156 | 'navarasu/onedark.nvim', | 202 | 'navarasu/onedark.nvim', |
157 | priority = 1000, | 203 | priority = 1000, |
158 | config = function() | 204 | config = function() |
159 | vim.cmd.colorscheme 'onedark' | 205 | -- vim.cmd.colorscheme 'onedark' |
206 | vim.cmd.colorscheme 'koehler' | ||
160 | vim.api.nvim_command('highlight ExtraWhitespaces ctermbg=red guibg=red') | 207 | vim.api.nvim_command('highlight ExtraWhitespaces ctermbg=red guibg=red') |
161 | vim.fn.matchadd('ExtraWhitespaces', '\\s\\+$') | 208 | vim.fn.matchadd('ExtraWhitespaces', '\\s\\+$') |
162 | end, | 209 | end, |
@@ -315,9 +362,9 @@ vim.cmd("let g:lightline = { 'colorscheme': 'wombat' }") | |||
315 | vim.cmd("nnoremap <silent> <leader>z :Goyo<CR>") | 362 | vim.cmd("nnoremap <silent> <leader>z :Goyo<CR>") |
316 | 363 | ||
317 | -- [[ Configure NERDTree ]] | 364 | -- [[ Configure NERDTree ]] |
318 | vim.cmd('let g:NERDTreeWinPos = "left"') | 365 | vim.g.NERDTreeWinPos = 'left' |
319 | vim.cmd("let NERDTreeShowHidden=0") | 366 | vim.g.NERDTreeShowHidden = 0 |
320 | vim.cmd("let NERDTreeQuitOnOpen=1") | 367 | vim.g.NERDTreeQuitOnOpen = 1 |
321 | vim.api.nvim_set_var('NERDTreeWinSize', 35) | 368 | vim.api.nvim_set_var('NERDTreeWinSize', 35) |
322 | vim.cmd("map <C-n> :NERDTreeToggle<cr>") | 369 | vim.cmd("map <C-n> :NERDTreeToggle<cr>") |
323 | vim.cmd("map <leader>nb :NERDTreeFromBookmark<Space>") | 370 | vim.cmd("map <leader>nb :NERDTreeFromBookmark<Space>") |
@@ -419,8 +466,8 @@ require('nvim-treesitter.configs').setup { | |||
419 | -- You can use the capture groups defined in textobjects.scm | 466 | -- You can use the capture groups defined in textobjects.scm |
420 | ['aa'] = '@parameter.outer', | 467 | ['aa'] = '@parameter.outer', |
421 | ['ia'] = '@parameter.inner', | 468 | ['ia'] = '@parameter.inner', |
422 | ['af'] = '@function.outer', | ||
423 | ['if'] = '@function.inner', | 469 | ['if'] = '@function.inner', |
470 | ['af'] = '@function.outer', | ||
424 | ['ac'] = '@class.outer', | 471 | ['ac'] = '@class.outer', |
425 | ['ic'] = '@class.inner', | 472 | ['ic'] = '@class.inner', |
426 | }, | 473 | }, |
@@ -533,6 +580,10 @@ local servers = { | |||
533 | Lua = { | 580 | Lua = { |
534 | workspace = { checkThirdParty = false }, | 581 | workspace = { checkThirdParty = false }, |
535 | telemetry = { enable = false }, | 582 | telemetry = { enable = false }, |
583 | diagnostics = { | ||
584 | -- Get the language server to recognize the `vim` global | ||
585 | globals = { 'vim' }, | ||
586 | }, | ||
536 | }, | 587 | }, |
537 | }, | 588 | }, |
538 | } | 589 | } |