From 8ff0f35da1873d997c7e912db2a6a57cecd06fbe Mon Sep 17 00:00:00 2001 From: TJ DeVries Date: Mon, 26 Feb 2024 09:53:08 -0500 Subject: [PATCH] finally done --- init.lua | 100 +++++++++++++++++++-------------------- lua/kickstart/health.lua | 13 +++-- 2 files changed, 58 insertions(+), 55 deletions(-) diff --git a/init.lua b/init.lua index 72231f9..0d19b08 100644 --- a/init.lua +++ b/init.lua @@ -72,10 +72,12 @@ Kickstart Guide: 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 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, - TJ @@ -230,26 +232,19 @@ require('lazy').setup({ { 'numToStr/Comment.nvim', opts = {} }, -- Here is a more advanced example where we pass configuration - -- options to `conform.nvim`. This is equivalent to: - -- require('conform').setup({ ... }) + -- options to `gitsigns.nvim`. This is equivalent to the following lua: + -- require('gitsigns').setup({ ... }) -- - -- See `:help conform` to understand what the configuration keys do - { -- Autoformat - 'stevearc/conform.nvim', + -- See `:help gitsigns` to understand what the configuration keys do + { -- Adds git related signs to the gutter, as well as utilities for managing changes + 'lewis6991/gitsigns.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" } }, + signs = { + add = { text = '+' }, + change = { text = '~' }, + delete = { text = '_' }, + topdelete = { text = '‾' }, + changedelete = { text = '~' }, }, }, }, @@ -492,9 +487,6 @@ require('lazy').setup({ -- See `:help K` for why this keymap map('K', vim.lsp.buf.hover, 'Hover Documentation') - -- Show the signature of the function you're currently completing. - map('', vim.lsp.buf.signature_help, 'Signature Documentation') - -- WARN: This is not Goto Definition, this is Goto Declaration. -- For example, in C this would take you to the header 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 -- To check the current status of installed tools and/or manually install -- other tools, you can run @@ -588,7 +573,15 @@ require('lazy').setup({ -- -- You can press `g?` for help in this menu 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-lspconfig').setup { handlers = { function(server_name) @@ -608,6 +601,26 @@ require('lazy').setup({ 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 'hrsh7th/nvim-cmp', event = 'InsertEnter', @@ -701,20 +714,6 @@ require('lazy').setup({ 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. -- Change the name of the colorscheme plugin below, and then -- 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 -- put them in the right spots if you want. - -- 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. + -- NOTE: Next step on your Neovim journey: Add/Configure additional plugins for kickstart + -- + -- 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.indent_line', -- 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 - -- 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. + -- This is the easiest way to modularize your config. -- - -- 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' }, }, {}) diff --git a/lua/kickstart/health.lua b/lua/kickstart/health.lua index 9547c3a..957204e 100644 --- a/lua/kickstart/health.lua +++ b/lua/kickstart/health.lua @@ -36,11 +36,14 @@ return { check = function() vim.health.start 'kickstart.nvim' - vim.health.info [[You don't have to fix every 'WARNING' you see in checkheath." - 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' - but if you are not planning on developing in those languages, you do not have' - to fix those at this time']] + vim.health.info [[NOTE: Not every warning is a 'must-fix' in `:checkhealth` + + Fix only warnings for plugins and languages you intend to use. + Mason will give warnings for languages that are not installed. + 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_external_reqs()