NEW: dictionary based completions
This commit is contained in:
parent
1cc09f5af5
commit
0f1869af26
|
@ -23,13 +23,21 @@ packer.startup(function(use)
|
|||
'onsails/lspkind-nvim',
|
||||
--'onsails/lspkind-nvim',
|
||||
--'hrsh7th/cmp-nvim-lsp-signature-help',
|
||||
'f3fora/cmp-spell' -- TODO check if needed
|
||||
'f3fora/cmp-spell',
|
||||
'uga-rosa/cmp-dictionary',
|
||||
},
|
||||
config = function()
|
||||
require('user.plugins.cmp')
|
||||
end
|
||||
}
|
||||
|
||||
use {
|
||||
'uga-rosa/cmp-dictionary',
|
||||
config = function ()
|
||||
require('user.plugins.cmp-dictionary')
|
||||
end
|
||||
}
|
||||
|
||||
use {
|
||||
'neovim/nvim-lspconfig',
|
||||
requires = {
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
local cmp_dict = require('cmp_dictionary')
|
||||
|
||||
cmp_dict.setup({
|
||||
dic = {
|
||||
-- TODO set based on langq
|
||||
['*'] = {'/home/jeanclaude/.local/share/dict/de_CH.dict'},
|
||||
--spelllang = {
|
||||
-- --en = '/home/jeanclaude/.local/share/dict/en_GB.dict'
|
||||
-- de = '/home/jeanclaude/.local/share/dict/de_CH.dict'
|
||||
--}
|
||||
}
|
||||
})
|
|
@ -25,7 +25,8 @@ cmp.setup({
|
|||
luasnip = '[Snip]',
|
||||
path = '[Path]',
|
||||
buffer = '[Buffer]',
|
||||
spell = '[Dict]',
|
||||
spell = '[Spell]',
|
||||
dictionary = '[Dict]',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -66,6 +67,7 @@ cmp.setup({
|
|||
{ name = 'luasnip' },
|
||||
{ name = 'path' },
|
||||
{ name = 'buffer' },
|
||||
{ name = 'dictionary' },
|
||||
{ name = 'spell' },
|
||||
},
|
||||
experimental = {
|
||||
|
|
|
@ -30,7 +30,7 @@ local function config(_config)
|
|||
|
||||
buf_keymap(bufnr, 'n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>')
|
||||
buf_keymap(bufnr, 'n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>')
|
||||
buf_keymap(bufnr, 'n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>')
|
||||
-- buf_keymap(bufnr, 'n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>')
|
||||
buf_keymap(bufnr, 'n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>')
|
||||
buf_keymap(bufnr, 'n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>')
|
||||
buf_keymap(bufnr, 'n', '<space>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>')
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
# Dictionaries
|
||||
|
||||
Based on aspell generated with: `aspell -d <lang> dump master | aspell -l <lang> expand > my.dict`
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/sh
|
||||
|
||||
aspell -d de_CH dump master | aspell -l de_CH expand | sed --expression='s/ß/ss/g' > de_CH.dict
|
Loading…
Reference in New Issue