finally done
This commit is contained in:
parent
30a1ccc89b
commit
8ff0f35da1
2 changed files with 58 additions and 55 deletions
100
init.lua
100
init.lua
|
@ -72,10 +72,12 @@ Kickstart Guide:
|
||||||
|
|
||||||
NOTE: Look for lines like this
|
NOTE: Look for lines like this
|
||||||
|
|
||||||
Throughout the file. These are for you, the reader to help understand what is happening.
|
Throughout the file. These are for you, the reader, to help understand what is happening.
|
||||||
Feel free to delete them once you know what you're doing, but they should serve as a guide
|
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 nvim config.
|
for when you are first encountering a few different constructs in your nvim config.
|
||||||
|
|
||||||
|
If you experience any errors while trying to install kickstart, run `:checkhealth` for more info
|
||||||
|
|
||||||
I hope you enjoy your Neovim journey,
|
I hope you enjoy your Neovim journey,
|
||||||
- TJ
|
- TJ
|
||||||
|
|
||||||
|
@ -230,26 +232,19 @@ require('lazy').setup({
|
||||||
{ 'numToStr/Comment.nvim', opts = {} },
|
{ 'numToStr/Comment.nvim', opts = {} },
|
||||||
|
|
||||||
-- Here is a more advanced example where we pass configuration
|
-- Here is a more advanced example where we pass configuration
|
||||||
-- options to `conform.nvim`. This is equivalent to:
|
-- options to `gitsigns.nvim`. This is equivalent to the following lua:
|
||||||
-- require('conform').setup({ ... })
|
-- require('gitsigns').setup({ ... })
|
||||||
--
|
--
|
||||||
-- See `:help conform` to understand what the configuration keys do
|
-- See `:help gitsigns` to understand what the configuration keys do
|
||||||
{ -- Autoformat
|
{ -- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||||
'stevearc/conform.nvim',
|
'lewis6991/gitsigns.nvim',
|
||||||
opts = {
|
opts = {
|
||||||
notify_on_error = false,
|
signs = {
|
||||||
format_on_save = {
|
add = { text = '+' },
|
||||||
timeout_ms = 500,
|
change = { text = '~' },
|
||||||
lsp_fallback = true,
|
delete = { text = '_' },
|
||||||
},
|
topdelete = { text = '‾' },
|
||||||
formatters_by_ft = {
|
changedelete = { text = '~' },
|
||||||
lua = { 'stylua' },
|
|
||||||
-- Conform can also run multiple formatters sequentially
|
|
||||||
-- python = { "isort", "black" },
|
|
||||||
--
|
|
||||||
-- You can use a sub-list to tell conform to run *until* a formatter
|
|
||||||
-- is found.
|
|
||||||
-- javascript = { { "prettierd", "prettier" } },
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -492,9 +487,6 @@ require('lazy').setup({
|
||||||
-- See `:help K` for why this keymap
|
-- See `:help K` for why this keymap
|
||||||
map('K', vim.lsp.buf.hover, 'Hover Documentation')
|
map('K', vim.lsp.buf.hover, 'Hover Documentation')
|
||||||
|
|
||||||
-- Show the signature of the function you're currently completing.
|
|
||||||
map('<C-k>', vim.lsp.buf.signature_help, 'Signature Documentation')
|
|
||||||
|
|
||||||
-- WARN: This is not Goto Definition, this is Goto Declaration.
|
-- WARN: This is not Goto Definition, this is Goto Declaration.
|
||||||
-- For example, in C this would take you to the header
|
-- For example, in C this would take you to the header
|
||||||
map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
|
map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
|
||||||
|
@ -574,13 +566,6 @@ require('lazy').setup({
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- 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 {})
|
|
||||||
vim.list_extend(ensure_installed, {
|
|
||||||
'stylua', -- Used to format lua code
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Ensure the servers and tools above are installed
|
-- Ensure the servers and tools above are installed
|
||||||
-- To check the current status of installed tools and/or manually install
|
-- To check the current status of installed tools and/or manually install
|
||||||
-- other tools, you can run
|
-- other tools, you can run
|
||||||
|
@ -588,7 +573,15 @@ require('lazy').setup({
|
||||||
--
|
--
|
||||||
-- You can press `g?` for help in this menu
|
-- You can press `g?` for help in this menu
|
||||||
require('mason').setup()
|
require('mason').setup()
|
||||||
|
|
||||||
|
-- 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 {})
|
||||||
|
vim.list_extend(ensure_installed, {
|
||||||
|
'stylua', -- Used to format lua code
|
||||||
|
})
|
||||||
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
||||||
|
|
||||||
require('mason-lspconfig').setup {
|
require('mason-lspconfig').setup {
|
||||||
handlers = {
|
handlers = {
|
||||||
function(server_name)
|
function(server_name)
|
||||||
|
@ -608,6 +601,26 @@ require('lazy').setup({
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{ -- Autoformat
|
||||||
|
'stevearc/conform.nvim',
|
||||||
|
opts = {
|
||||||
|
notify_on_error = false,
|
||||||
|
format_on_save = {
|
||||||
|
timeout_ms = 500,
|
||||||
|
lsp_fallback = true,
|
||||||
|
},
|
||||||
|
formatters_by_ft = {
|
||||||
|
lua = { 'stylua' },
|
||||||
|
-- Conform can also run multiple formatters sequentially
|
||||||
|
-- python = { "isort", "black" },
|
||||||
|
--
|
||||||
|
-- You can use a sub-list to tell conform to run *until* a formatter
|
||||||
|
-- is found.
|
||||||
|
-- javascript = { { "prettierd", "prettier" } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
{ -- Autocompletion
|
{ -- Autocompletion
|
||||||
'hrsh7th/nvim-cmp',
|
'hrsh7th/nvim-cmp',
|
||||||
event = 'InsertEnter',
|
event = 'InsertEnter',
|
||||||
|
@ -701,20 +714,6 @@ require('lazy').setup({
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ -- Adds git related signs to the gutter, as well as utilities for managing changes
|
|
||||||
'lewis6991/gitsigns.nvim',
|
|
||||||
opts = {
|
|
||||||
-- See `:help gitsigns.txt`
|
|
||||||
signs = {
|
|
||||||
add = { text = '+' },
|
|
||||||
change = { text = '~' },
|
|
||||||
delete = { text = '_' },
|
|
||||||
topdelete = { text = '‾' },
|
|
||||||
changedelete = { text = '~' },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
{ -- You can easily change to a different colorscheme.
|
{ -- You can easily change to a different colorscheme.
|
||||||
-- Change the name of the colorscheme plugin below, and then
|
-- Change the name of the colorscheme plugin below, and then
|
||||||
-- change the command in the config to whatever the name of that colorscheme is
|
-- change the command in the config to whatever the name of that colorscheme is
|
||||||
|
@ -791,18 +790,19 @@ require('lazy').setup({
|
||||||
-- init.lua. If you want these files, they are in the repository, so you can just download them and
|
-- init.lua. If you want these files, they are in the repository, so you can just download them and
|
||||||
-- put them in the right spots if you want.
|
-- put them in the right spots if you want.
|
||||||
|
|
||||||
-- NOTE: Next Step on Your Neovim Journey: Add/Configure additional plugins for kickstart
|
-- NOTE: Next step on your Neovim journey: Add/Configure additional plugins for kickstart
|
||||||
-- These are some example plugins that I've included in the kickstart repository.
|
--
|
||||||
-- Uncomment any of the lines below to enable them.
|
-- 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.debug',
|
||||||
-- require 'kickstart.plugins.indent_line',
|
-- require 'kickstart.plugins.indent_line',
|
||||||
|
|
||||||
-- NOTE: The import below can automatically add 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
|
-- This is the easiest way to modularize your config.
|
||||||
-- 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
|
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
||||||
|
-- For additional information see: :help lazy.nvim-lazy.nvim-structuring-your-plugins
|
||||||
-- { import = 'custom.plugins' },
|
-- { import = 'custom.plugins' },
|
||||||
}, {})
|
}, {})
|
||||||
|
|
||||||
|
|
|
@ -36,11 +36,14 @@ return {
|
||||||
check = function()
|
check = function()
|
||||||
vim.health.start 'kickstart.nvim'
|
vim.health.start 'kickstart.nvim'
|
||||||
|
|
||||||
vim.health.info [[You don't have to fix every 'WARNING' you see in checkheath."
|
vim.health.info [[NOTE: Not every warning is a 'must-fix' in `:checkhealth`
|
||||||
Just fix the ones for the plugins and languages you intend to use.'
|
|
||||||
For example, in Mason, you may see warnings about several language runtimes'
|
Fix only warnings for plugins and languages you intend to use.
|
||||||
but if you are not planning on developing in those languages, you do not have'
|
Mason will give warnings for languages that are not installed.
|
||||||
to fix those at this time']]
|
You do not need to install, unless you want to use those languages!]]
|
||||||
|
|
||||||
|
local uv = vim.uv or vim.loop
|
||||||
|
vim.health.info('System Information: ' .. vim.inspect(uv.os_uname()))
|
||||||
|
|
||||||
check_version()
|
check_version()
|
||||||
check_external_reqs()
|
check_external_reqs()
|
||||||
|
|
Loading…
Reference in a new issue