diff --git a/lua/keymaps.lua b/lua/keymaps.lua index 93be8db..bd6f40d 100644 --- a/lua/keymaps.lua +++ b/lua/keymaps.lua @@ -1,8 +1,8 @@ -- [[ Basic Keymaps ]] -- See `:help vim.keymap.set()` --- Set highlight on search, but clear on pressing in normal mode -vim.opt.hlsearch = true +-- Clear highlights on search when pressing in normal mode +-- See `:help hlsearch` vim.keymap.set('n', '', 'nohlsearch') -- Diagnostic keymaps diff --git a/lua/kickstart/plugins/conform.lua b/lua/kickstart/plugins/conform.lua index 52d68af..9cba01a 100644 --- a/lua/kickstart/plugins/conform.lua +++ b/lua/kickstart/plugins/conform.lua @@ -30,9 +30,8 @@ return { -- 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' } }, + -- You can use 'stop_after_first' to run the first available formatter from the list + javascript = { 'prettierd', 'prettier', stop_after_first = true }, }, }, }, diff --git a/lua/kickstart/plugins/lspconfig.lua b/lua/kickstart/plugins/lspconfig.lua index e0daba5..de84c51 100644 --- a/lua/kickstart/plugins/lspconfig.lua +++ b/lua/kickstart/plugins/lspconfig.lua @@ -1,5 +1,20 @@ +-- LSP Plugins return { - { -- LSP Configuration & Plugins + { + -- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins + -- used for completion, annotations and signatures of Neovim apis + 'folke/lazydev.nvim', + ft = 'lua', + opts = { + library = { + -- Load luvit types when the `vim.uv` word is found + { path = 'luvit-meta/library', words = { 'vim%.uv' } }, + }, + }, + }, + { 'Bilal2453/luvit-meta', lazy = true }, + { + -- Main LSP Configuration 'neovim/nvim-lspconfig', dependencies = { -- Automatically install LSPs and related tools to stdpath for Neovim @@ -10,20 +25,6 @@ return { -- Useful status updates for LSP. -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})` { 'j-hui/fidget.nvim', opts = {} }, - - -- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins - -- used for completion, annotations and signatures of Neovim apis - { - 'folke/lazydev.nvim', - ft = 'lua', - opts = { - library = { - -- Load luvit types when the `vim.uv` word is found - { path = 'luvit-meta/library', words = { 'vim%.uv' } }, - }, - }, - }, - { 'Bilal2453/luvit-meta', lazy = true }, }, config = function() -- Brief aside: **What is LSP?** diff --git a/lua/options.lua b/lua/options.lua index 35f726e..cea6b52 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -38,9 +38,12 @@ vim.opt.mouse = 'a' vim.opt.showmode = false -- Sync clipboard between OS and Neovim. +-- Schedule the setting after `UiEnter` because it can increase startup-time. -- Remove this option if you want your OS clipboard to remain independent. -- See `:help 'clipboard'` -vim.opt.clipboard = 'unnamedplus' +vim.schedule(function() + vim.opt.clipboard = 'unnamedplus' +end) -- Enable break indent vim.opt.breakindent = true