From d86c9187b55236ba432bb2728ab714ce15384deb Mon Sep 17 00:00:00 2001 From: MithicSpirit Date: Sat, 24 Jun 2023 16:52:35 -0400 Subject: [PATCH 1/2] feat(ft): add lean3 support ft=lean seems to be specifically for lean4. See https://github.com/Julian/lean.nvim/blob/main/ftdetect/lean.lua --- lua/Comment/ft.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/Comment/ft.lua b/lua/Comment/ft.lua index 09f9279e..8223b79e 100644 --- a/lua/Comment/ft.lua +++ b/lua/Comment/ft.lua @@ -91,6 +91,7 @@ local L = setmetatable({ julia = { M.hash, '#=%s=#' }, kotlin = { M.cxx_l, M.cxx_b }, lean = { M.dash, '/-%s-/' }, + lean3 = { M.dash, '/-%s-/' }, lidris = { M.dash, M.haskell_b }, lilypond = { M.latex, '%{%s%}' }, lisp = { M.lisp_l, M.lisp_b }, From 67dc190ca5a2178671d1c457e060dfaf19a68bc6 Mon Sep 17 00:00:00 2001 From: MithicSpirit Date: Fri, 4 Aug 2023 22:42:37 -0400 Subject: [PATCH 2/2] nit(ft): move lean block comment to M table The `/-%s-/` block comment style is shared by `lean` and `lean3`, so it is moved to the `M` table as `lean_b` to reduce code duplication. --- lua/Comment/ft.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/Comment/ft.lua b/lua/Comment/ft.lua index 8223b79e..bfa967bc 100644 --- a/lua/Comment/ft.lua +++ b/lua/Comment/ft.lua @@ -31,6 +31,7 @@ local M = { lisp_b = '#|%s|#', twig = '{#%s#}', vim = '"%s', + lean_b = '/-%s-/', } ---Lang table that contains commentstring (linewise/blockwise) for multiple filetypes @@ -90,8 +91,8 @@ local L = setmetatable({ jsonnet = { M.cxx_l, M.cxx_b }, julia = { M.hash, '#=%s=#' }, kotlin = { M.cxx_l, M.cxx_b }, - lean = { M.dash, '/-%s-/' }, - lean3 = { M.dash, '/-%s-/' }, + lean = { M.dash, M.lean_b }, + lean3 = { M.dash, M.lean_b }, lidris = { M.dash, M.haskell_b }, lilypond = { M.latex, '%{%s%}' }, lisp = { M.lisp_l, M.lisp_b },