added spelling and dictionary options

This commit is contained in:
Joost Agterhoek 2024-10-29 14:36:34 +01:00
parent a2f9116d30
commit 2250714cb3

View File

@ -3,13 +3,16 @@
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
vim.opt.termguicolors = true
vim.g.vim_markdown_auto_insert_bullets = 0
-- To make sure image.nvim works with luarocks
package.path = package.path .. ';' .. vim.fn.expand '$HOME' .. '/.luarocks/share/lua/5.1/?/init.lua;'
package.path = package.path .. ';' .. vim.fn.expand '$HOME' .. '/.luarocks/share/lua/5.1/?.lua'
vim.opt_local.autochdir = true
vim.opt.spelllang = 'en_us'
vim.opt.spelllang = { 'en_us', 'nl' }
vim.opt.spell = true
vim.keymap.set('n', '<C-s>', ':!feh --geometry 640x480+1200+50 <cfile><CR>', { desc = 'Show image under cursor with feh' })
@ -17,8 +20,12 @@ vim.keymap.set('n', '<C-s>', ':!feh --geometry 640x480+1200+50 <cfile><CR>', { d
require 'keymaps'
vim.opt.foldmethod = syntax
vim.opt.foldlevel = 99
vim.g.dictionary = true
vim.opt.complete:append { 'k' }
-- END OF TESTING REGION
--[[
@ -605,6 +612,7 @@ require('lazy').setup({
gopls = {},
pyright = {},
rust_analyzer = {},
-- typos_lsp = {}, doesn't work well all the time with Dutch words
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
--
-- Some languages (like typescript) have entire language plugins that can be useful:
@ -704,6 +712,8 @@ require('lazy').setup({
'hrsh7th/nvim-cmp',
event = 'InsertEnter',
dependencies = {
{ 'octaltree/cmp-look' },
{ 'f3fora/cmp-spell' },
-- Snippet Engine & its associated nvim-cmp source
{
'L3MON4D3/LuaSnip',
@ -751,7 +761,10 @@ require('lazy').setup({
luasnip.lsp_expand(args.body)
end,
},
-- TESTING OUT AUTOCOMPLETE WITHOUT KEYSTROKE
completion = { completeopt = 'menu,menuone,noinsert' },
-- completion = { keyword_length = 1, keyword_pattern = '.*', max_item_count = 5 },
-- TESTING OUT AUTOCOMPLETE WITHOUT KEYSTROKE
-- For an understanding of why these mappings were
-- chosen, you will need to read `:help ins-completion`
@ -812,6 +825,17 @@ require('lazy').setup({
group_index = 0,
},
{ name = 'nvim_lsp' },
-- { name = 'look', keyword_length = 1, option = { convert_case = true, loud = true } },
{
name = 'spell',
option = {
keep_all_entries = false,
enable_in_context = function()
return true
end,
preselect_correct_word = true,
},
},
{ name = 'luasnip' },
{ name = 'path' },
},