Merge branch 'nvim-lua:master' into master

This commit is contained in:
Mark 2024-02-11 15:41:06 -05:00 committed by GitHub
commit 4ebc2858c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 83 additions and 7 deletions

View file

@ -100,7 +100,18 @@ require('lazy').setup({
'hrsh7th/nvim-cmp',
dependencies = {
-- Snippet Engine & its associated nvim-cmp source
'L3MON4D3/LuaSnip',
{
'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
if vim.fn.has 'win32' == 1 then
return
end
return 'make install_jsregexp'
end)(),
},
'saadparwaiz1/cmp_luasnip',
-- Adds LSP completion capabilities
@ -193,8 +204,13 @@ require('lazy').setup({
-- Theme inspired by Atom
'navarasu/onedark.nvim',
priority = 1000,
lazy = false,
config = function()
vim.cmd.colorscheme 'onedark'
require('onedark').setup {
-- Set a style preset. 'dark' is default.
style = 'dark', -- dark, darker, cool, deep, warm, warmer, light
}
require('onedark').load()
end,
},
@ -205,7 +221,7 @@ require('lazy').setup({
opts = {
options = {
icons_enabled = false,
theme = 'onedark',
theme = 'auto',
component_separators = '|',
section_separators = '',
},
@ -427,7 +443,12 @@ vim.defer_fn(function()
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
auto_install = false,
-- Install languages synchronously (only applied to `ensure_installed`)
sync_install = false,
-- List of parsers to ignore installing
ignore_install = {},
-- You can specify additional Treesitter modules here: -- For example: -- playground = {--enable = true,-- },
modules = {},
highlight = { enable = true },
indent = { enable = true },
incremental_selection = {
@ -504,7 +525,9 @@ local on_attach = function(_, bufnr)
end
nmap('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame')
nmap('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
nmap('<leader>ca', function()
vim.lsp.buf.code_action { context = { only = { 'quickfix', 'refactor', 'source' } } }
end, '[C]ode [A]ction')
nmap('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')
nmap('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')