Startup fixes and add cmp-tabnine

This commit is contained in:
Tyler Hallada 2023-12-01 15:26:00 -05:00
parent 4a4a4a74c6
commit 1e36116761
4 changed files with 34 additions and 7 deletions

View File

@ -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',

View 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
})

View File

@ -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,
})

View File

@ -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")