diff options
author | Damjan 9000 <damjan.9000@gmail.com> | 2024-03-18 18:50:47 +0100 |
---|---|---|
committer | Damjan 9000 <damjan.9000@gmail.com> | 2024-03-18 18:50:47 +0100 |
commit | d20d58c3e8e3103aed891f4477dbb24f5839c3f8 (patch) | |
tree | c5887bf5734bb65a2da35e860465c75becb07ff5 /lua/kickstart | |
parent | b59b1d2a3dc55c766388457c8c4f0c2d2975aa90 (diff) | |
parent | 65a5ac404b56c4718d79f65ac642e19e89346eda (diff) |
Merge 'upstream' Some suggestions and capitalised a few words
Diffstat (limited to 'lua/kickstart')
-rw-r--r-- | lua/kickstart/plugins/cmp.lua | 10 | ||||
-rw-r--r-- | lua/kickstart/plugins/gitsigns.lua | 2 | ||||
-rw-r--r-- | lua/kickstart/plugins/lspconfig.lua | 29 | ||||
-rw-r--r-- | lua/kickstart/plugins/telescope.lua | 18 | ||||
-rw-r--r-- | lua/kickstart/plugins/tokyonight.lua | 8 | ||||
-rw-r--r-- | lua/kickstart/plugins/which-key.lua | 2 |
6 files changed, 34 insertions, 35 deletions
diff --git a/lua/kickstart/plugins/cmp.lua b/lua/kickstart/plugins/cmp.lua index 7ed2ba8..6d893aa 100644 --- a/lua/kickstart/plugins/cmp.lua +++ b/lua/kickstart/plugins/cmp.lua @@ -7,9 +7,9 @@ return { { '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 + -- 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 or vim.fn.executable 'make' == 0 then return end @@ -59,7 +59,7 @@ return { -- Select the [p]revious item ['<C-p>'] = cmp.mapping.select_prev_item(), - -- scroll the documentation window [b]ack / [f]orward + -- Scroll the documentation window [b]ack / [f]orward ['<C-b>'] = cmp.mapping.scroll_docs(-4), ['<C-f>'] = cmp.mapping.scroll_docs(4), @@ -92,7 +92,7 @@ return { end end, { 'i', 's' }), - -- For more advanced luasnip keymaps (e.g. selecting choice nodes, expansion) see: + -- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see: -- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps }, sources = { diff --git a/lua/kickstart/plugins/gitsigns.lua b/lua/kickstart/plugins/gitsigns.lua index eaf79bb..24bd14b 100644 --- a/lua/kickstart/plugins/gitsigns.lua +++ b/lua/kickstart/plugins/gitsigns.lua @@ -1,5 +1,5 @@ -- Here is a more advanced example where we pass configuration --- options to `gitsigns.nvim`. This is equivalent to the following lua: +-- options to `gitsigns.nvim`. This is equivalent to the following Lua: -- require('gitsigns').setup({ ... }) -- -- See `:help gitsigns` to understand what the configuration keys do diff --git a/lua/kickstart/plugins/lspconfig.lua b/lua/kickstart/plugins/lspconfig.lua index 9d0e369..8da925b 100644 --- a/lua/kickstart/plugins/lspconfig.lua +++ b/lua/kickstart/plugins/lspconfig.lua @@ -2,7 +2,7 @@ return { { -- LSP Configuration & Plugins 'neovim/nvim-lspconfig', dependencies = { - -- Automatically install LSPs and related tools to stdpath for neovim + -- Automatically install LSPs and related tools to stdpath for Neovim 'williamboman/mason.nvim', 'williamboman/mason-lspconfig.nvim', 'WhoIsSethDaniel/mason-tool-installer.nvim', @@ -16,15 +16,15 @@ return { { 'folke/neodev.nvim', opts = {} }, }, config = function() - -- Brief Aside: **What is LSP?** + -- Brief aside: **What is LSP?** -- - -- LSP is an acronym you've probably heard, but might not understand what it is. + -- LSP is an initialism you've probably heard, but might not understand what it is. -- -- LSP stands for Language Server Protocol. It's a protocol that helps editors -- and language tooling communicate in a standardized fashion. -- -- In general, you have a "server" which is some tool built to understand a particular - -- language (such as `gopls`, `lua_ls`, `rust_analyzer`, etc). These Language Servers + -- language (such as `gopls`, `lua_ls`, `rust_analyzer`, etc.). These Language Servers -- (sometimes called LSP servers, but that's kind of like ATM Machine) are standalone -- processes that communicate with some "client" - in this case, Neovim! -- @@ -48,9 +48,8 @@ return { vim.api.nvim_create_autocmd('LspAttach', { group = vim.api.nvim_create_augroup('kickstart-lsp-attach', { clear = true }), callback = function(event) - -- NOTE: Remember that lua is a real programming language, and as such it is possible - -- to define small helper and utility functions so you don't have to repeat yourself - -- many times. + -- NOTE: Remember that Lua is a real programming language, and as such it is possible + -- to define small helper and utility functions so you don't have to repeat yourself. -- -- In this case, we create a function that lets us more easily define mappings specific -- for LSP related items. It sets the mode, buffer and description for us each time. @@ -79,11 +78,11 @@ return { -- Symbols are things like variables, functions, types, etc. map('<leader>ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols') - -- Fuzzy find all the symbols in your current workspace - -- Similar to document symbols, except searches over your whole project. + -- Fuzzy find all the symbols in your current workspace. + -- Similar to document symbols, except searches over your entire project. map('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols') - -- Rename the variable under your cursor + -- Rename the variable under your cursor. -- Most Language Servers support renaming across files, etc. map('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame') @@ -92,11 +91,11 @@ return { map('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction') -- Opens a popup that displays documentation about the word under your cursor - -- See `:help K` for why this keymap + -- See `:help K` for why this keymap. map('K', vim.lsp.buf.hover, 'Hover Documentation') -- 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') -- The following two autocommands are used to highlight references of the @@ -120,7 +119,7 @@ return { }) -- LSP servers and clients are able to communicate to each other what features they support. - -- By default, Neovim doesn't support everything that is in the LSP Specification. + -- By default, Neovim doesn't support everything that is in the LSP specification. -- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities. -- So, we create new capabilities with nvim cmp, and then broadcast that to the servers. local capabilities = vim.lsp.protocol.make_client_capabilities() @@ -170,14 +169,14 @@ return { -- other tools, you can run -- :Mason -- - -- You can press `g?` for help in this menu + -- 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 + 'stylua', -- Used to format Lua code }) require('mason-tool-installer').setup { ensure_installed = ensure_installed } diff --git a/lua/kickstart/plugins/telescope.lua b/lua/kickstart/plugins/telescope.lua index a88b52b..159971f 100644 --- a/lua/kickstart/plugins/telescope.lua +++ b/lua/kickstart/plugins/telescope.lua @@ -12,7 +12,7 @@ return { branch = '0.1.x', dependencies = { 'nvim-lua/plenary.nvim', - { -- If encountering errors, see telescope-fzf-native README for install instructions + { -- If encountering errors, see telescope-fzf-native README for installation instructions 'nvim-telescope/telescope-fzf-native.nvim', -- `build` is used to run some command when the plugin is installed/updated. @@ -35,19 +35,19 @@ return { -- it can fuzzy find! It's more than just a "file finder", it can search -- many different aspects of Neovim, your workspace, LSP, and more! -- - -- The easiest way to use telescope, is to start by doing something like: + -- The easiest way to use Telescope, is to start by doing something like: -- :Telescope help_tags -- -- After running this command, a window will open up and you're able to - -- type in the prompt window. You'll see a list of help_tags options and + -- type in the prompt window. You'll see a list of `help_tags` options and -- a corresponding preview of the help. -- - -- Two important keymaps to use while in telescope are: + -- Two important keymaps to use while in Telescope are: -- - Insert mode: <c-/> -- - Normal mode: ? -- -- This opens a window that shows you all of the keymaps for the current - -- telescope picker. This is really useful to discover what Telescope can + -- Telescope picker. This is really useful to discover what Telescope can -- do as well as how to actually do it! -- [[ Configure Telescope ]] @@ -69,7 +69,7 @@ return { }, } - -- Enable telescope extensions, if they are installed + -- Enable Telescope extensions if they are installed pcall(require('telescope').load_extension, 'fzf') pcall(require('telescope').load_extension, 'ui-select') @@ -88,14 +88,14 @@ return { -- Slightly advanced example of overriding default behavior and theme vim.keymap.set('n', '<leader>/', function() - -- You can pass additional configuration to telescope to change theme, layout, etc. + -- You can pass additional configuration to Telescope to change the theme, layout, etc. builtin.current_buffer_fuzzy_find(require('telescope.themes').get_dropdown { winblend = 10, previewer = false, }) end, { desc = '[/] Fuzzily search in current buffer' }) - -- Also possible to pass additional configuration options. + -- It's also possible to pass additional configuration options. -- See `:help telescope.builtin.live_grep()` for information about particular keys vim.keymap.set('n', '<leader>s/', function() builtin.live_grep { @@ -104,7 +104,7 @@ return { } end, { desc = '[S]earch [/] in Open Files' }) - -- Shortcut for searching your neovim configuration files + -- Shortcut for searching your Neovim configuration files vim.keymap.set('n', '<leader>sn', function() builtin.find_files { cwd = vim.fn.stdpath 'config' } end, { desc = '[S]earch [N]eovim files' }) diff --git a/lua/kickstart/plugins/tokyonight.lua b/lua/kickstart/plugins/tokyonight.lua index 6ac97c7..3e5e74d 100644 --- a/lua/kickstart/plugins/tokyonight.lua +++ b/lua/kickstart/plugins/tokyonight.lua @@ -1,18 +1,18 @@ return { { -- 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 + -- change the command in the config to whatever the name of that colorscheme is. -- - -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme` + -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`. 'folke/tokyonight.nvim', - priority = 1000, -- make sure to load this before all the other start plugins + priority = 1000, -- Make sure to load this before all the other start plugins. init = function() -- Load the colorscheme here. -- Like many other themes, this one has different styles, and you could load -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. vim.cmd.colorscheme 'tokyonight-night' - -- You can configure highlights by doing something like + -- You can configure highlights by doing something like: vim.cmd.hi 'Comment gui=none' end, }, diff --git a/lua/kickstart/plugins/which-key.lua b/lua/kickstart/plugins/which-key.lua index b73b17b..d66449e 100644 --- a/lua/kickstart/plugins/which-key.lua +++ b/lua/kickstart/plugins/which-key.lua @@ -1,4 +1,4 @@ --- NOTE: Plugins can also be configured to run lua code when they are loaded. +-- NOTE: Plugins can also be configured to run Lua code when they are loaded. -- -- This is often very useful to both group configuration, as well as handle -- lazy loading plugins that don't need to be loaded immediately at startup. |