Merge 'upstream' refactor lazydev, defer clipboard

performance: defer clipboard because xsel and pbcopy can be slow
refactor: remove lazydev and luvit-meta as lsp dependencies
This commit is contained in:
Damjan 9000 2024-07-29 20:17:53 +02:00
commit 0a274ab66c
2 changed files with 20 additions and 16 deletions

View File

@ -1,19 +1,8 @@
-- LSP Plugins
return { return {
{ -- LSP Configuration & Plugins {
'neovim/nvim-lspconfig',
dependencies = {
-- Automatically install LSPs and related tools to stdpath for Neovim
{ 'williamboman/mason.nvim', config = true }, -- NOTE: Must be loaded before dependants
'williamboman/mason-lspconfig.nvim',
'WhoIsSethDaniel/mason-tool-installer.nvim',
-- 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 -- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins
-- used for completion, annotations and signatures of Neovim apis -- used for completion, annotations and signatures of Neovim apis
{
'folke/lazydev.nvim', 'folke/lazydev.nvim',
ft = 'lua', ft = 'lua',
opts = { opts = {
@ -24,6 +13,18 @@ return {
}, },
}, },
{ 'Bilal2453/luvit-meta', lazy = true }, { 'Bilal2453/luvit-meta', lazy = true },
{
-- Main LSP Configuration
'neovim/nvim-lspconfig',
dependencies = {
-- Automatically install LSPs and related tools to stdpath for Neovim
{ 'williamboman/mason.nvim', config = true }, -- NOTE: Must be loaded before dependants
'williamboman/mason-lspconfig.nvim',
'WhoIsSethDaniel/mason-tool-installer.nvim',
-- Useful status updates for LSP.
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
{ 'j-hui/fidget.nvim', opts = {} },
}, },
config = function() config = function()
-- Brief aside: **What is LSP?** -- Brief aside: **What is LSP?**

View File

@ -16,9 +16,12 @@ vim.opt.mouse = 'a'
vim.opt.showmode = false vim.opt.showmode = false
-- Sync clipboard between OS and Neovim. -- 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. -- Remove this option if you want your OS clipboard to remain independent.
-- See `:help 'clipboard'` -- See `:help 'clipboard'`
vim.opt.clipboard = 'unnamedplus' vim.schedule(function()
vim.opt.clipboard = 'unnamedplus'
end)
-- Enable break indent -- Enable break indent
vim.opt.breakindent = true vim.opt.breakindent = true