diff --git a/lua/autocommands.lua b/lua/autocommands.lua index 830b4bc..552efde 100644 --- a/lua/autocommands.lua +++ b/lua/autocommands.lua @@ -72,3 +72,15 @@ vim.api.nvim_create_autocmd("FileType", { end, }) +-- Jujutsu spellchecking +local jjgroup = vim.api.nvim_create_augroup("jujustu", { clear = true }) +vim.api.nvim_create_autocmd("FileType", { + pattern = { "jj" }, + group = jjgroup, + callback = function() + vim.o.spell = true + vim.o.spelllang = "en" + require('spelling').spell_keymap() + end, +}) + diff --git a/lua/complete.lua b/lua/complete.lua index d75d192..9571192 100644 --- a/lua/complete.lua +++ b/lua/complete.lua @@ -8,6 +8,7 @@ luasnip.config.setup { updateevents = "TextChanged,TextChangedI", enable_autosnippets = true, } +luasnip.filetype_extend("jj", {"gitcommit"}) local has_words_before = function() unpack = unpack or table.unpack diff --git a/lua/lsp.lua b/lua/lsp.lua index 1ede8fb..8303ce2 100644 --- a/lua/lsp.lua +++ b/lua/lsp.lua @@ -105,6 +105,7 @@ local servers = { 'latex', 'norg', 'gitcommit', + 'jj', 'rst', 'typst' },