From c10feb7712ef9b87e6b0ff27027a55942dc2b874 Mon Sep 17 00:00:00 2001 From: Fabrice Mouhartem Date: Sun, 10 Nov 2024 15:03:48 +0100 Subject: [PATCH] feat(jujutsu): Add support for jj description - Snippets - Spellchecking - Grammar checking --- lua/autocommands.lua | 12 ++++++++++++ lua/complete.lua | 1 + lua/lsp.lua | 1 + 3 files changed, 14 insertions(+) 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' },