From 8235bc93b001aa42527e3cd5a4249e7946ef9c42 Mon Sep 17 00:00:00 2001 From: Alexander Gehrke Date: Tue, 21 Sep 2021 16:47:05 +0200 Subject: [PATCH] Add missed files --- after/plugin/nvim-metals.vim | 2 ++ ftdetect/hocon.vim | 1 + lua/conf/cmp.lua | 25 +++++++++++++++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 after/plugin/nvim-metals.vim create mode 100644 ftdetect/hocon.vim create mode 100644 lua/conf/cmp.lua diff --git a/after/plugin/nvim-metals.vim b/after/plugin/nvim-metals.vim new file mode 100644 index 0000000..b29809e --- /dev/null +++ b/after/plugin/nvim-metals.vim @@ -0,0 +1,2 @@ +":let g:metals_server_version = '0.10.6-M1+29-22f5a4b1-SNAPSHOT' +"let g:metals_server_version = '0.10.6-M1' diff --git a/ftdetect/hocon.vim b/ftdetect/hocon.vim new file mode 100644 index 0000000..7e9a1e6 --- /dev/null +++ b/ftdetect/hocon.vim @@ -0,0 +1 @@ +au! BufNewFile,BufRead .scalafmt.conf set ft=hocon syntax=hocon diff --git a/lua/conf/cmp.lua b/lua/conf/cmp.lua new file mode 100644 index 0000000..ec04ac3 --- /dev/null +++ b/lua/conf/cmp.lua @@ -0,0 +1,25 @@ +local cmp = require'cmp' +cmp.setup({ + snippet = { + expand = function(args) + vim.fn["vsnip#anonymous"](args.body) + end, + }, + mapping = { + [''] = cmp.mapping.confirm({ select = true }), + [''] = cmp.mapping.complete(), + [''] = cmp.mapping.close(), + [''] = cmp.mapping.confirm({ + behavior = cmp.ConfirmBehavior.Replace, + select = true, + }), + [''] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 's' }) + }, + sources = { + { name = 'nvim_lsp' }, + { name = 'buffer' }, + { name = 'path' }, + } +}) +local capabilities = vim.lsp.protocol.make_client_capabilities() +capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)