Merge branch 'nvim-lua:master' into master
This commit is contained in:
commit
230b568f00
|
@ -4,6 +4,7 @@ on: pull_request_target
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
stylua-check:
|
stylua-check:
|
||||||
|
if: github.repository == 'nvim-lua/kickstart.nvim'
|
||||||
name: Stylua Check
|
name: Stylua Check
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
52
README.md
52
README.md
|
@ -192,3 +192,55 @@ This requires:
|
||||||
{'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' }
|
{'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' }
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Hints And Tips For New Neovimmers
|
||||||
|
|
||||||
|
Neovim is a very rich and powerful environment, but it can also feel a bit
|
||||||
|
intimidating for new users trying to find their way around, especially if
|
||||||
|
they're coming from other environments like Visual Studio Code or a traditional
|
||||||
|
IDE.
|
||||||
|
|
||||||
|
There's no way this README can provide you with everything you need to know, but
|
||||||
|
here are a few tips so you can learn how to learn.
|
||||||
|
|
||||||
|
### Use The Help, Luke!
|
||||||
|
|
||||||
|
Neovim's help system is incredibly thorough and extensive. You should really
|
||||||
|
take a moment to get comfortable navigating through help topics, going back and
|
||||||
|
forth, navigating the menus, etc. This won't just help you read the help, it
|
||||||
|
will empower you in the rest of your Neovim journey.
|
||||||
|
|
||||||
|
You can double click on a topic to drill down, and hit Ctrl-o (Hold down the
|
||||||
|
Control key and the 'o' key) to go back.
|
||||||
|
|
||||||
|
Read the first page you get when you run :help carefully. it will serve you
|
||||||
|
well.
|
||||||
|
|
||||||
|
You can also get help on a particular thing by typing ":help <topic>".
|
||||||
|
|
||||||
|
Like, let's say we want to learn more about folding, just type ":help folding".
|
||||||
|
|
||||||
|
### To The Telescope!
|
||||||
|
|
||||||
|
One of the more powerful features you get by installing this project is the
|
||||||
|
brilliant Telescope plugin co-written by @tjdevries.
|
||||||
|
|
||||||
|
Take a minute to browse through ":help telescope" and get a sense for all the
|
||||||
|
amazing superpowers you've gained.
|
||||||
|
|
||||||
|
In particular, there are two Telescope features that are incredible for helping
|
||||||
|
you understand how to do a particular thing or how to configure a particular
|
||||||
|
feature.
|
||||||
|
|
||||||
|
If you're not sure what to look for, try ":Telescope help_tags". Let's say we
|
||||||
|
want to configure Neovim to automatically word wrap. We might type ":Telescope
|
||||||
|
help_tags" and then type w, r, a, p. Notice how the list of results changes with
|
||||||
|
each new letter you type? When you're done you've got a screen full of topics
|
||||||
|
involving word wrap.
|
||||||
|
|
||||||
|
Another common question is "What keys do I hit to make a thing happen?". To get
|
||||||
|
an answer, one way is to use ":Telescope keymaps". You'll get the same list of
|
||||||
|
results that changes to adapt with each new key you press.
|
||||||
|
|
||||||
|
With these hints in mind you should be in good shape to get learning. Remember,
|
||||||
|
you are on a journey of discovery here, adapting your programming environment to
|
||||||
|
your needs. It will take effort, but the rewards are worth it! :)
|
||||||
|
|
24
init.lua
24
init.lua
|
@ -100,7 +100,18 @@ require('lazy').setup({
|
||||||
'hrsh7th/nvim-cmp',
|
'hrsh7th/nvim-cmp',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
-- Snippet Engine & its associated nvim-cmp source
|
-- Snippet Engine & its associated nvim-cmp source
|
||||||
|
{
|
||||||
'L3MON4D3/LuaSnip',
|
'L3MON4D3/LuaSnip',
|
||||||
|
build = (function()
|
||||||
|
-- Build Step is needed for regex support in snippets
|
||||||
|
-- This step is not supported in many windows environments
|
||||||
|
-- Remove the below condition to re-enable on windows
|
||||||
|
if vim.fn.has 'win32' == 1 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
return 'make install_jsregexp'
|
||||||
|
end)(),
|
||||||
|
},
|
||||||
'saadparwaiz1/cmp_luasnip',
|
'saadparwaiz1/cmp_luasnip',
|
||||||
|
|
||||||
-- Adds LSP completion capabilities
|
-- Adds LSP completion capabilities
|
||||||
|
@ -193,8 +204,13 @@ require('lazy').setup({
|
||||||
-- Theme inspired by Atom
|
-- Theme inspired by Atom
|
||||||
'navarasu/onedark.nvim',
|
'navarasu/onedark.nvim',
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
|
lazy = false,
|
||||||
config = function()
|
config = function()
|
||||||
vim.cmd.colorscheme 'onedark'
|
require('onedark').setup {
|
||||||
|
-- Set a style preset. 'dark' is default.
|
||||||
|
style = 'dark', -- dark, darker, cool, deep, warm, warmer, light
|
||||||
|
}
|
||||||
|
require('onedark').load()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -205,7 +221,7 @@ require('lazy').setup({
|
||||||
opts = {
|
opts = {
|
||||||
options = {
|
options = {
|
||||||
icons_enabled = false,
|
icons_enabled = false,
|
||||||
theme = 'onedark',
|
theme = 'auto',
|
||||||
component_separators = '|',
|
component_separators = '|',
|
||||||
section_separators = '',
|
section_separators = '',
|
||||||
},
|
},
|
||||||
|
@ -514,7 +530,9 @@ local on_attach = function(_, bufnr)
|
||||||
end
|
end
|
||||||
|
|
||||||
nmap('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame')
|
nmap('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame')
|
||||||
nmap('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
|
nmap('<leader>ca', function()
|
||||||
|
vim.lsp.buf.code_action { context = { only = { 'quickfix', 'refactor', 'source' } } }
|
||||||
|
end, '[C]ode [A]ction')
|
||||||
|
|
||||||
nmap('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')
|
nmap('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')
|
||||||
nmap('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
|
nmap('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
|
||||||
|
|
Loading…
Reference in New Issue