Merge branch 'master' of github.com:nvim-lua/kickstart.nvim into nvim-lua-master
This commit is contained in:
commit
b674fe48f4
@ -1,5 +1,7 @@
|
|||||||
# kickstart.nvim
|
# kickstart.nvim
|
||||||
|
|
||||||
|
https://github.com/kdheepak/kickstart.nvim/assets/1813121/f3ff9a2b-c31f-44df-a4fa-8a0d7b17cf7b
|
||||||
|
|
||||||
### Introduction
|
### Introduction
|
||||||
|
|
||||||
A starting point for Neovim that is:
|
A starting point for Neovim that is:
|
||||||
@ -9,7 +11,7 @@ A starting point for Neovim that is:
|
|||||||
* Documented
|
* Documented
|
||||||
* Modular
|
* Modular
|
||||||
|
|
||||||
This repo is meant to be used as by **YOU** to begin your Neovim journey; remove the things you don't use and add what you miss.
|
This repo is meant to be used by **YOU** to begin your Neovim journey; remove the things you don't use and add what you miss.
|
||||||
|
|
||||||
Kickstart.nvim targets *only* the latest ['stable'](https://github.com/neovim/neovim/releases/tag/stable) and latest ['nightly'](https://github.com/neovim/neovim/releases/tag/nightly) of Neovim. If you are experiencing issues, please make sure you have the latest versions.
|
Kickstart.nvim targets *only* the latest ['stable'](https://github.com/neovim/neovim/releases/tag/stable) and latest ['nightly'](https://github.com/neovim/neovim/releases/tag/nightly) of Neovim. If you are experiencing issues, please make sure you have the latest versions.
|
||||||
|
|
||||||
@ -34,7 +36,7 @@ Distribution Alternatives:
|
|||||||
`~/.config/nvim` (MacOS)
|
`~/.config/nvim` (MacOS)
|
||||||
`%userprofile%\AppData\Local\nvim\` (Windows)
|
`%userprofile%\AppData\Local\nvim\` (Windows)
|
||||||
|
|
||||||
* run: `git clone https://github.com/nvim-lua/kickstart.nvim.git ~/.config/nvim` OR: `gh repo clone nvim-lua/kickstart.nvim`
|
* Run: `git clone https://github.com/nvim-lua/kickstart.nvim.git ~/.config/nvim` OR: `gh repo clone nvim-lua/kickstart.nvim`
|
||||||
* Run Neovim (from terminal or shortcut) and allow lazy.nvim to download files and set up the basics.
|
* Run Neovim (from terminal or shortcut) and allow lazy.nvim to download files and set up the basics.
|
||||||
* Once the setup is complete, restart Neovim.
|
* Once the setup is complete, restart Neovim.
|
||||||
* **You're ready to go!**
|
* **You're ready to go!**
|
||||||
@ -53,7 +55,7 @@ Additional system requirements:
|
|||||||
* Inside of your copy, feel free to modify any file you like! It's your copy!
|
* Inside of your copy, feel free to modify any file you like! It's your copy!
|
||||||
* Feel free to change any of the default options in `init.lua` to better suit your needs.
|
* Feel free to change any of the default options in `init.lua` to better suit your needs.
|
||||||
* For adding plugins, there are 3 primary options:
|
* For adding plugins, there are 3 primary options:
|
||||||
* Add new configuration in `lua/custom/plugins/*` files, which will be auto sourced using `lazy.nvim`
|
* Add new configuration in `lua/custom/plugins/*` files, which will be auto sourced using `lazy.nvim` (uncomment the line importing the `custom/plugins` directory in the `init.lua` file to enable this)
|
||||||
* Modify `init.lua` with additional plugins.
|
* Modify `init.lua` with additional plugins.
|
||||||
* Include the `lua/kickstart/plugins/*` files in your configuration.
|
* Include the `lua/kickstart/plugins/*` files in your configuration.
|
||||||
|
|
||||||
|
28
init.lua
28
init.lua
@ -17,7 +17,9 @@ Kickstart.nvim is a template for your own configuration.
|
|||||||
a guide. One possible example:
|
a guide. One possible example:
|
||||||
- https://learnxinyminutes.com/docs/lua/
|
- https://learnxinyminutes.com/docs/lua/
|
||||||
|
|
||||||
|
|
||||||
And then you can explore or search through `:help lua-guide`
|
And then you can explore or search through `:help lua-guide`
|
||||||
|
- https://neovim.io/doc/user/lua-guide.html
|
||||||
|
|
||||||
|
|
||||||
Kickstart Guide:
|
Kickstart Guide:
|
||||||
@ -110,7 +112,7 @@ require('lazy').setup({
|
|||||||
-- Useful plugin to show you pending keybinds.
|
-- Useful plugin to show you pending keybinds.
|
||||||
{ 'folke/which-key.nvim', opts = {} },
|
{ 'folke/which-key.nvim', opts = {} },
|
||||||
{
|
{
|
||||||
-- Adds git releated signs to the gutter, as well as utilities for managing changes
|
-- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||||
'lewis6991/gitsigns.nvim',
|
'lewis6991/gitsigns.nvim',
|
||||||
opts = {
|
opts = {
|
||||||
-- See `:help gitsigns.txt`
|
-- See `:help gitsigns.txt`
|
||||||
@ -165,8 +167,11 @@ require('lazy').setup({
|
|||||||
{ 'numToStr/Comment.nvim', opts = {} },
|
{ 'numToStr/Comment.nvim', opts = {} },
|
||||||
|
|
||||||
-- Fuzzy Finder (files, lsp, etc)
|
-- Fuzzy Finder (files, lsp, etc)
|
||||||
{ 'nvim-telescope/telescope.nvim', branch = '0.1.x', dependencies = { 'nvim-lua/plenary.nvim' } },
|
{
|
||||||
|
'nvim-telescope/telescope.nvim',
|
||||||
|
branch = '0.1.x',
|
||||||
|
dependencies = {
|
||||||
|
'nvim-lua/plenary.nvim',
|
||||||
-- Fuzzy Finder Algorithm which requires local dependencies to be built.
|
-- Fuzzy Finder Algorithm which requires local dependencies to be built.
|
||||||
-- Only load if `make` is available. Make sure you have the system
|
-- Only load if `make` is available. Make sure you have the system
|
||||||
-- requirements installed.
|
-- requirements installed.
|
||||||
@ -179,6 +184,8 @@ require('lazy').setup({
|
|||||||
return vim.fn.executable 'make' == 1
|
return vim.fn.executable 'make' == 1
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
-- Highlight, edit, and navigate code
|
-- Highlight, edit, and navigate code
|
||||||
@ -195,12 +202,13 @@ require('lazy').setup({
|
|||||||
-- require 'kickstart.plugins.autoformat',
|
-- require 'kickstart.plugins.autoformat',
|
||||||
-- require 'kickstart.plugins.debug',
|
-- require 'kickstart.plugins.debug',
|
||||||
|
|
||||||
-- NOTE: The import below automatically adds your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
||||||
-- You can use this folder to prevent any conflicts with this init.lua if you're interested in keeping
|
-- You can use this folder to prevent any conflicts with this init.lua if you're interested in keeping
|
||||||
-- up-to-date with whatever is in the kickstart repo.
|
-- up-to-date with whatever is in the kickstart repo.
|
||||||
|
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
||||||
--
|
--
|
||||||
-- For additional information see: https://github.com/folke/lazy.nvim#-structuring-your-plugins
|
-- For additional information see: https://github.com/folke/lazy.nvim#-structuring-your-plugins
|
||||||
{ import = 'custom.plugins' },
|
-- { import = 'custom.plugins' },
|
||||||
}, {})
|
}, {})
|
||||||
|
|
||||||
-- [[ Setting options ]]
|
-- [[ Setting options ]]
|
||||||
@ -236,7 +244,6 @@ vim.wo.signcolumn = 'yes'
|
|||||||
|
|
||||||
-- Decrease update time
|
-- Decrease update time
|
||||||
vim.o.updatetime = 250
|
vim.o.updatetime = 250
|
||||||
vim.o.timeout = true
|
|
||||||
vim.o.timeoutlen = 300
|
vim.o.timeoutlen = 300
|
||||||
|
|
||||||
-- Set completeopt to have a better completion experience
|
-- Set completeopt to have a better completion experience
|
||||||
@ -304,7 +311,7 @@ vim.keymap.set('n', '<leader>sd', require('telescope.builtin').diagnostics, { de
|
|||||||
-- See `:help nvim-treesitter`
|
-- See `:help nvim-treesitter`
|
||||||
require('nvim-treesitter.configs').setup {
|
require('nvim-treesitter.configs').setup {
|
||||||
-- Add languages to be installed here that you want installed for treesitter
|
-- Add languages to be installed here that you want installed for treesitter
|
||||||
ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'typescript', 'vimdoc', 'vim', 'yaml' },
|
ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'javascript', 'typescript', 'vimdoc', 'vim', 'yaml' },
|
||||||
|
|
||||||
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
|
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
|
||||||
auto_install = false,
|
auto_install = false,
|
||||||
@ -422,12 +429,16 @@ end
|
|||||||
--
|
--
|
||||||
-- Add any additional override configuration in the following tables. They will be passed to
|
-- Add any additional override configuration in the following tables. They will be passed to
|
||||||
-- the `settings` field of the server config. You must look up that documentation yourself.
|
-- the `settings` field of the server config. You must look up that documentation yourself.
|
||||||
|
--
|
||||||
|
-- If you want to override the default filetypes that your language server will attach to you can
|
||||||
|
-- define the property 'filetypes' to the map in question.
|
||||||
local servers = {
|
local servers = {
|
||||||
-- clangd = {},
|
-- clangd = {},
|
||||||
-- gopls = {},
|
-- gopls = {},
|
||||||
-- pyright = {},
|
-- pyright = {},
|
||||||
-- rust_analyzer = {},
|
-- rust_analyzer = {},
|
||||||
-- tsserver = {},
|
-- tsserver = {},
|
||||||
|
-- html = { filetypes = { 'html', 'twig', 'hbs'} },
|
||||||
|
|
||||||
lua_ls = {
|
lua_ls = {
|
||||||
Lua = {
|
Lua = {
|
||||||
@ -457,8 +468,9 @@ mason_lspconfig.setup_handlers {
|
|||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
settings = servers[server_name],
|
settings = servers[server_name],
|
||||||
|
filetypes = (servers[server_name] or {}).filetypes,
|
||||||
}
|
}
|
||||||
end,
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
-- [[ Configure nvim-cmp ]]
|
-- [[ Configure nvim-cmp ]]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user