From 15737b7151cdb3157fcd742e377408f68917ff47 Mon Sep 17 00:00:00 2001 From: "Radu C. Martin" Date: Sat, 19 Apr 2025 22:21:38 +0200 Subject: [PATCH] feat: enable spell sheck for markdown and json files --- ftplugin/json.lua | 15 +++++++++++++++ ftplugin/markdown.lua | 5 +++++ 2 files changed, 20 insertions(+) create mode 100644 ftplugin/json.lua create mode 100644 ftplugin/markdown.lua diff --git a/ftplugin/json.lua b/ftplugin/json.lua new file mode 100644 index 0000000..2a670ca --- /dev/null +++ b/ftplugin/json.lua @@ -0,0 +1,15 @@ +-- Set indentation to 4 spaces for JSON files +vim.bo.shiftwidth = 4 -- Number of spaces for auto-indent +vim.bo.tabstop = 4 -- Number of spaces per tab +vim.bo.softtabstop = 4 -- Number of spaces per Tab key press +vim.bo.expandtab = true -- Convert tabs to spaces + +-- Enable auto-indenting +vim.bo.autoindent = true +vim.bo.smartindent = true + +-- Ensure file formatting is consistent +vim.bo.fileformat = 'unix' + +-- Optionally, enable spell checking for JSON comments +vim.wo.spell = true diff --git a/ftplugin/markdown.lua b/ftplugin/markdown.lua new file mode 100644 index 0000000..ddca080 --- /dev/null +++ b/ftplugin/markdown.lua @@ -0,0 +1,5 @@ +-- Ensure file formatting is consistent +vim.bo.fileformat = 'unix' + +-- Optionally, enable spell checking for JSON comments +vim.wo.spell = true