Merge remote-tracking branch 'upstream/master'

This commit is contained in:
ZaneFerns360 2024-08-02 17:25:55 +05:30
commit 6440047017
1 changed files with 26 additions and 19 deletions

View File

@ -111,9 +111,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.schedule(function()
vim.opt.clipboard = 'unnamedplus' vim.opt.clipboard = 'unnamedplus'
end)
-- Enable break indent -- Enable break indent
vim.opt.breakindent = true vim.opt.breakindent = true
@ -157,8 +160,8 @@ vim.opt.scrolloff = 10
-- [[ Basic Keymaps ]] -- [[ Basic Keymaps ]]
-- See `:help vim.keymap.set()` -- See `:help vim.keymap.set()`
-- Set highlight on search, but clear on pressing <Esc> in normal mode -- Clear highlights on search when pressing <Esc> in normal mode
vim.opt.hlsearch = true -- See `:help hlsearch`
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>') vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
-- Diagnostic keymaps -- Diagnostic keymaps
@ -432,7 +435,22 @@ require('lazy').setup({
end, end,
}, },
{ -- LSP Configuration & Plugins -- LSP 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', 'neovim/nvim-lspconfig',
dependencies = { dependencies = {
-- Automatically install LSPs and related tools to stdpath for Neovim -- Automatically install LSPs and related tools to stdpath for Neovim
@ -444,19 +462,8 @@ require('lazy').setup({
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})` -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
{ 'j-hui/fidget.nvim', opts = {} }, { 'j-hui/fidget.nvim', opts = {} },
-- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins -- Allows extra capabilities provided by nvim-cmp
-- used for completion, annotations and signatures of Neovim apis 'hrsh7th/cmp-nvim-lsp',
{
'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() config = function()
-- Brief aside: **What is LSP?** -- Brief aside: **What is LSP?**
@ -747,6 +754,8 @@ require('lazy').setup({
python = { 'ruff_format' }, python = { 'ruff_format' },
c = { 'clang_format' }, c = { 'clang_format' },
cpp = { 'clang_format' }, cpp = { 'clang_format' },
-- You can use 'stop_after_first' to run the first available formatter from the list
-- javascript = { "prettierd", "prettier", stop_after_first = true },
}, },
}, },
}, },
@ -925,8 +934,6 @@ require('lazy').setup({
config = function(_, opts) config = function(_, opts)
-- [[ Configure Treesitter ]] See `:help nvim-treesitter` -- [[ Configure Treesitter ]] See `:help nvim-treesitter`
-- Prefer git instead of curl in order to improve connectivity in some environments
require('nvim-treesitter.install').prefer_git = true
---@diagnostic disable-next-line: missing-fields ---@diagnostic disable-next-line: missing-fields
require('nvim-treesitter.configs').setup(opts) require('nvim-treesitter.configs').setup(opts)