This commit is contained in:
Nachuan Tang
2023-02-15 23:19:46 -05:00
parent 01b1328186
commit a9efbe46f6
2 changed files with 0 additions and 62 deletions
-22
View File
@@ -99,28 +99,6 @@
Plug 'nvim-lualine/lualine.nvim'
"{ lsp-zero
" LSP Support
" Plug 'neovim/nvim-lspconfig' " Required
" Plug 'williamboman/mason.nvim' " Optional
" Plug 'williamboman/mason-lspconfig.nvim' " Optional
" " Autocompletion Engine
" Plug 'hrsh7th/nvim-cmp' " Required
" Plug 'hrsh7th/cmp-nvim-lsp' " Required
" Plug 'hrsh7th/cmp-buffer' " Optional
" Plug 'hrsh7th/cmp-path' " Optional
" Plug 'saadparwaiz1/cmp_luasnip' " Optional
" Plug 'hrsh7th/cmp-nvim-lua' " Optional
" " Snippets
" Plug 'L3MON4D3/LuaSnip' " Required
" Plug 'rafamadriz/friendly-snippets' " Optional
" Plug 'VonHeikemen/lsp-zero.nvim', {'branch': 'v1.x'}
"}
endif
if g:vim_version >= 0.7
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
-40
View File
@@ -52,46 +52,6 @@ local function transparent_config()
})
end
local function lsp_zero_config()
-- Learn the keybindings, see :help lsp-zero-keybindings
-- Learn to configure LSP servers, see :help lsp-zero-api-showcase
local lsp = require('lsp-zero')
lsp.preset('recommended')
-- make sure this servers are installed
-- see :help lsp-zero.ensure_installed()
lsp.ensure_installed({
'rust_analyzer',
'tsserver',
'eslint',
'sumneko_lua',
'jdtls',
'vimls',
})
-- local cmp = require('cmp')
lsp.setup_nvim_cmp({
-- mapping = cmp.mapping.preset.insert({
-- ['<C-b>'] = cmp.mapping.scroll_docs(-4),
-- ['<C-f>'] = cmp.mapping.scroll_docs(4),
-- }),
formatting = {
format = function(entry, vim_item)
local len = string.len(vim_item.abbr)
vim_item.abbr = string.sub(vim_item.abbr, 1, 30)
if len > 30 then
vim_item.abbr = vim_item.abbr .. '...'
end
return vim_item
end
}
})
-- (Optional) Configure lua language server for neovim
lsp.nvim_workspace()
lsp.setup()
end
local function lualine_config()
for i=1,9 do
vim.api.nvim_set_keymap('n', '<Leader>'..i, ':LualineBuffersJump '..i..'<CR>', { noremap = true, silent = true, nowait = true })