cmp
This commit is contained in:
@ -5,9 +5,15 @@
|
|||||||
-- Plugin: nvim-cmp
|
-- Plugin: nvim-cmp
|
||||||
-- url: https://github.com/hrsh7th/nvim-cmpa
|
-- url: https://github.com/hrsh7th/nvim-cmpa
|
||||||
|
|
||||||
|
local cmp_status_ok, cmp = pcall(require, 'cmp')
|
||||||
|
if not cmp_status_ok then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
local cmp = require 'cmp'
|
local luasnip_status_ok, luasnip = pcall(require, 'luasnip')
|
||||||
local luasnip = require 'luasnip'
|
if not luasnip_status_ok then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
cmp.setup {
|
cmp.setup {
|
||||||
-- Load snippet support
|
-- Load snippet support
|
||||||
|
|||||||
@ -57,33 +57,6 @@ local on_attach = function(client, bufnr)
|
|||||||
buf_set_keymap('n', '<space>f', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts)
|
buf_set_keymap('n', '<space>f', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--[[
|
|
||||||
|
|
||||||
Language servers:
|
|
||||||
|
|
||||||
Add your language server to `servers`
|
|
||||||
|
|
||||||
For language servers list see:
|
|
||||||
https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
|
|
||||||
|
|
||||||
Bash --> bashls
|
|
||||||
https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#bashls
|
|
||||||
|
|
||||||
Python --> pyright
|
|
||||||
https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#pyright
|
|
||||||
|
|
||||||
C-C++ --> clangd
|
|
||||||
https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#clangd
|
|
||||||
|
|
||||||
HTML/CSS/JSON --> vscode-html-languageserver
|
|
||||||
https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#html
|
|
||||||
|
|
||||||
JavaScript/TypeScript --> tsserver
|
|
||||||
https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#tsserver
|
|
||||||
|
|
||||||
--]]
|
|
||||||
|
|
||||||
-- Use a loop to conveniently call 'setup' on multiple servers and
|
-- Use a loop to conveniently call 'setup' on multiple servers and
|
||||||
-- map buffer local keybindings when the language server attaches
|
-- map buffer local keybindings when the language server attaches
|
||||||
local servers = { 'bashls', 'pyright', 'pylsp', 'clangd', 'html', 'tsserver', 'marksman', 'prosemd_lsp', 'dockerls', 'cssls', 'cssmodules_ls', 'arduino_language_server', 'pyre', 'gopls', 'theme_check' }
|
local servers = { 'bashls', 'pyright', 'pylsp', 'clangd', 'html', 'tsserver', 'marksman', 'prosemd_lsp', 'dockerls', 'cssls', 'cssmodules_ls', 'arduino_language_server', 'pyre', 'gopls', 'theme_check' }
|
||||||
|
|||||||
@ -25,14 +25,7 @@ return require'packer'.startup(function()
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
-- mappings = {
|
|
||||||
-- MkdnEnter = {{'i', 'n', 'v'}, '<CR>'},
|
|
||||||
-- MkdnToggleToDo = {{'i', 'n', 'v'}, '<C-Space>'},
|
|
||||||
-- MkdnNewListItem = {{'n','v'}, '<C-l>'},
|
|
||||||
-- MkdnNextLink = false,
|
|
||||||
-- MkdnPrevLink = false,
|
|
||||||
-- MkdnTableNextCell = false,
|
|
||||||
-- }
|
|
||||||
-- Headlines Extension
|
-- Headlines Extension
|
||||||
use 'lukas-reineke/headlines.nvim'
|
use 'lukas-reineke/headlines.nvim'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user