Startup fixes and add cmp-tabnine
This commit is contained in:
parent
af83a14dc1
commit
26446abf36
@ -312,6 +312,14 @@ return require('packer').startup(function(use)
|
||||
require('plugins.rust-tools-nvim')
|
||||
end,
|
||||
}
|
||||
use {
|
||||
'tzachar/cmp-tabnine',
|
||||
run = './install.sh',
|
||||
requires = 'hrsh7th/nvim-cmp',
|
||||
config = function()
|
||||
require('plugins.cmp-tabnine')
|
||||
end,
|
||||
}
|
||||
use 'ziglang/zig.vim'
|
||||
use {
|
||||
'akinsho/bufferline.nvim',
|
||||
|
15
lua/plugins/cmp-tabnine.lua
Normal file
15
lua/plugins/cmp-tabnine.lua
Normal file
@ -0,0 +1,15 @@
|
||||
local tabnine = require('cmp_tabnine.config')
|
||||
|
||||
tabnine:setup({
|
||||
max_lines = 1000,
|
||||
max_num_results = 20,
|
||||
sort = true,
|
||||
run_on_every_keystroke = true,
|
||||
snippet_placeholder = '..',
|
||||
ignored_file_types = {
|
||||
-- default is not to ignore
|
||||
-- uncomment to ignore in lua:
|
||||
-- lua = true
|
||||
},
|
||||
show_prediction_strength = true
|
||||
})
|
@ -1,4 +1,4 @@
|
||||
require('mason-lspconfig').setup({
|
||||
ensure_installed = { 'sumneko_lua', 'rust_analyzer', 'bashls', 'cssls', 'html', 'jsonls', 'marskman', 'sqls', 'taplo'},
|
||||
ensure_installed = { 'sumneko_lua', 'rust_analyzer', 'bashls', 'cssls', 'html', 'jsonls', 'sqls', 'taplo'},
|
||||
automatic_installation = true,
|
||||
})
|
||||
|
@ -48,6 +48,11 @@ cmp.setup({
|
||||
priority = 100,
|
||||
group_index = 1,
|
||||
},
|
||||
{
|
||||
name = 'cmp_tabnine',
|
||||
priority = 90,
|
||||
group_index = 2,
|
||||
},
|
||||
{
|
||||
name = 'buffer',
|
||||
priority = 80,
|
||||
@ -105,8 +110,7 @@ cmp.setup.cmdline(':', {
|
||||
})
|
||||
|
||||
-- Add additional capabilities supported by nvim-cmp
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
|
||||
local lspconfig = require("lspconfig")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user