|
|
@ -100,7 +100,18 @@ require('lazy').setup({
|
|
|
|
'hrsh7th/nvim-cmp',
|
|
|
|
'hrsh7th/nvim-cmp',
|
|
|
|
dependencies = {
|
|
|
|
dependencies = {
|
|
|
|
-- Snippet Engine & its associated nvim-cmp source
|
|
|
|
-- 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',
|
|
|
|
'saadparwaiz1/cmp_luasnip',
|
|
|
|
|
|
|
|
|
|
|
|
-- Adds LSP completion capabilities
|
|
|
|
-- Adds LSP completion capabilities
|
|
|
@ -193,8 +204,13 @@ require('lazy').setup({
|
|
|
|
-- Theme inspired by Atom
|
|
|
|
-- Theme inspired by Atom
|
|
|
|
'navarasu/onedark.nvim',
|
|
|
|
'navarasu/onedark.nvim',
|
|
|
|
priority = 1000,
|
|
|
|
priority = 1000,
|
|
|
|
|
|
|
|
lazy = false,
|
|
|
|
config = function()
|
|
|
|
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,
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
@ -205,7 +221,7 @@ require('lazy').setup({
|
|
|
|
opts = {
|
|
|
|
opts = {
|
|
|
|
options = {
|
|
|
|
options = {
|
|
|
|
icons_enabled = false,
|
|
|
|
icons_enabled = false,
|
|
|
|
theme = 'onedark',
|
|
|
|
theme = 'auto',
|
|
|
|
component_separators = '|',
|
|
|
|
component_separators = '|',
|
|
|
|
section_separators = '',
|
|
|
|
section_separators = '',
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -514,7 +530,9 @@ local on_attach = function(_, bufnr)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
nmap('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame')
|
|
|
|
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('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')
|
|
|
|
nmap('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
|
|
|
|
nmap('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
|
|
|
|