Add spell source & spelling suggestions

This commit is contained in:
Mans Ziesel 2024-05-27 10:00:38 +02:00
parent 08a1521eac
commit 2c8bee2a42

View File

@ -117,6 +117,7 @@ require('lazy').setup({
'hrsh7th/cmp-path', 'hrsh7th/cmp-path',
'hrsh7th/cmp-nvim-lua', 'hrsh7th/cmp-nvim-lua',
'f3fora/cmp-spell',
}, },
}, },
@ -236,6 +237,23 @@ require('lazy').setup({
{ "vimwiki/vimwiki" }, { "vimwiki/vimwiki" },
{ 'mattn/vim-goimports'}, { 'mattn/vim-goimports'},
{
'kristijanhusak/vim-dadbod-ui',
dependencies = {
{ 'tpope/vim-dadbod', lazy = true },
{ 'kristijanhusak/vim-dadbod-completion', ft = { 'sql', 'mysql', 'plsql' }, lazy = true },
},
cmd = {
'DBUI',
'DBUIToggle',
'DBUIAddConnection',
'DBUIFindBuffer',
},
init = function()
-- Your DBUI configuration
vim.g.db_ui_use_nerd_fonts = 1
end,
},
{ {
-- Highlight, edit, and navigate code -- Highlight, edit, and navigate code
@ -385,6 +403,10 @@ vim.keymap.set('n', '<leader>pf', telescope_builtin.find_files, {})
vim.keymap.set('n', '<leader>pg', telescope_builtin.live_grep, {}) vim.keymap.set('n', '<leader>pg', telescope_builtin.live_grep, {})
vim.keymap.set('n', '<leader>pb', telescope_builtin.buffers, {}) vim.keymap.set('n', '<leader>pb', telescope_builtin.buffers, {})
vim.keymap.set('n', '<leader>ph', telescope_builtin.help_tags, {}) vim.keymap.set('n', '<leader>ph', telescope_builtin.help_tags, {})
vim.keymap.set('n', '<leader>ph', telescope_builtin.help_tags, {})
vim.keymap.set("n", "<leader>ps", function()
require("telescope.builtin").spell_suggest(require("telescope.themes").get_cursor({}))
end, { desc = "Spelling Suggestions" })
-- [[ Configure Telescope ]] -- [[ Configure Telescope ]]
-- See `:help telescope` and `:help telescope.setup()` -- See `:help telescope` and `:help telescope.setup()`
@ -646,8 +668,25 @@ cmp.setup {
{ name = 'buffer' }, { name = 'buffer' },
{ name = 'path' }, { name = 'path' },
{ name = 'nvim_lua' }, { name = 'nvim_lua' },
{
name = "spell",
option = {
keep_all_entries = false,
enable_in_context = function()
return true
end,
preselect_correct_word = true,
},
},
}, },
} }
cmp.setup.filetype({"sql"}, {
sources = {
{ name = "vim-dadbod-completion"},
{ name = "buffer"}
}
})
-- The line beneath this is called `modeline`. See `:help modeline` -- The line beneath this is called `modeline`. See `:help modeline`
-- vim: ts=2 sts=2 sw=2 et -- vim: ts=2 sts=2 sw=2 et