{"id":3051,"date":"2026-08-19T18:05:06","date_gmt":"2026-08-19T22:05:06","guid":{"rendered":"https:\/\/csimmons.dev\/blog\/?p=3051"},"modified":"2026-08-19T18:13:37","modified_gmt":"2026-08-19T22:13:37","slug":"configure-a-global-cspell-user-dictionary-in-vs-code","status":"publish","type":"post","link":"https:\/\/csimmons.dev\/blog\/2026\/08\/configure-a-global-cspell-user-dictionary-in-vs-code\/","title":{"rendered":"Configure a Global cSpell User Dictionary in VS Code"},"content":{"rendered":"<p>This article shows how to move your custom cSpell words out of VS Code\u2019s <code>settings.json<\/code> and into a dedicated global dictionary. This keeps your configuration clean while providing a single, reusable place for technical terms, product names, and other words you use across projects.<\/p>\n<p>When using the Code Spell Checker (cSpell) extension in VS Code, custom words can be added directly to <code>settings.json<\/code> using <code>cSpell.userWords<\/code>. Over time, however, this list can become large and clutter the VS Code configuration.<\/p>\n<p>A cleaner approach is to maintain custom words in a separate global dictionary file.<\/p>\n<blockquote><p>\n  <strong>Note:<\/strong> These instructions assume you are using macOS.\n<\/p><\/blockquote>\n<h2>Create the Dictionary File<\/h2>\n<p>Create a global cSpell dictionary in your home directory:<\/p>\n<pre><code class=\"language-bash\">touch ~\/.cspell-dictionary.txt\n<\/code><\/pre>\n<p>For a user named <code>username<\/code>, the full path to the file would be:<\/p>\n<pre><code class=\"language-text\">\/Users\/username\/.cspell-dictionary.txt\n<\/code><\/pre>\n<p>Open the file in VS Code:<\/p>\n<pre><code class=\"language-bash\">code ~\/.cspell-dictionary.txt\n<\/code><\/pre>\n<p>Add custom words to the dictionary with <strong>one word per line<\/strong>:<\/p>\n<pre><code class=\"language-text\">bootcamp\ncfadmin\ncfconfig\ncfcs\ncfdocument\ncfengine\ncfformat\ncfinvoke\ncflog\ncfoutput\ncfpm\ncfschedule\ncfscript\ncfset\ncfusion\nCommandBox\nFixinator\nFlexbox\nGlyphicons\nlabwc\nLucee\nLUCEEONLY\nMailpit\nmailsent\nnavbars\nOllama\nraspi\nstrikethrough\nUdemy\nWebroot\nWebUI\n<\/code><\/pre>\n<p>Unlike <code>settings.json<\/code>, the dictionary file does not use JSON syntax. Do not include quotes, commas, or brackets.<\/p>\n<h2>Configure cSpell<\/h2>\n<p>Open your VS Code <code>settings.json<\/code> and add the following:<\/p>\n<pre><code class=\"language-json\">\"cSpell.dictionaryDefinitions\": [\n    {\n        \"name\": \"my-words\",\n        \"path\": \"\/Users\/username\/.cspell-dictionary.txt\",\n        \"addWords\": true\n    }\n],\n\"cSpell.dictionaries\": [\n    \"my-words\"\n],\n<\/code><\/pre>\n<p>This defines a dictionary named <code>my-words<\/code> and tells cSpell to use it globally.<\/p>\n<p>The <code>addWords<\/code> setting allows cSpell to add new words to this dictionary when using its <strong>Add Word to Dictionary<\/strong> functionality.<\/p>\n<h2>Remove <code>cSpell.userWords<\/code><\/h2>\n<p>If the same words are currently stored in <code>settings.json<\/code>:<\/p>\n<pre><code class=\"language-json\">\"cSpell.userWords\": [\n    \"CFML\",\n    \"CommandBox\",\n    \"Fixinator\",\n    \"Lucee\",\n    \"Ollama\"\n],\n<\/code><\/pre>\n<p>copy those words into <code>.cspell-dictionary.txt<\/code>, then remove the <code>cSpell.userWords<\/code> setting.<\/p>\n<p>Your custom words will now be maintained in the global dictionary instead of <code>settings.json<\/code>.<\/p>\n<h2>Adding New Words<\/h2>\n<p>When cSpell flags a legitimate word such as:<\/p>\n<pre><code class=\"language-text\">Ollama\n<\/code><\/pre>\n<p>use the cSpell quick fix in VS Code and add the word to the <code>my-words<\/code> dictionary.<\/p>\n<p>Because the dictionary was configured with:<\/p>\n<pre><code class=\"language-json\">\"addWords\": true\n<\/code><\/pre>\n<p>new words can be written to:<\/p>\n<pre><code class=\"language-text\">~\/.cspell-dictionary.txt\n<\/code><\/pre>\n<p>instead of continually expanding <code>cSpell.userWords<\/code> in <code>settings.json<\/code>.<\/p>\n<p>The dictionary will gradually grow as new project-specific terminology, product names, acronyms, and technical terms are encountered.<\/p>\n<h2>Result<\/h2>\n<p>The VS Code configuration remains small:<\/p>\n<pre><code class=\"language-json\">\"cSpell.dictionaryDefinitions\": [\n    {\n        \"name\": \"my-words\",\n        \"path\": \"\/Users\/username\/.cspell-dictionary.txt\",\n        \"addWords\": true\n    }\n],\n\"cSpell.dictionaries\": [\n    \"my-words\"\n],\n<\/code><\/pre>\n<p>while the potentially much larger collection of custom words lives separately in:<\/p>\n<pre><code class=\"language-text\">~\/.cspell-dictionary.txt\n<\/code><\/pre>\n<p>This keeps <code>settings.json<\/code> cleaner and provides a single global dictionary that can be maintained independently of VS Code&#8217;s other settings.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article shows how to move your custom cSpell words out of VS Code\u2019s settings.json and into a dedicated global dictionary. This keeps your configuration clean while providing a single, reusable place for technical terms, product names, and other words you use across projects. When using the Code Spell Checker (cSpell) extension in VS Code, &#8230; <a title=\"Configure a Global cSpell User Dictionary in VS Code\" class=\"read-more\" href=\"https:\/\/csimmons.dev\/blog\/2026\/08\/configure-a-global-cspell-user-dictionary-in-vs-code\/\" aria-label=\"Read more about Configure a Global cSpell User Dictionary in VS Code\">Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_cloudinary_featured_overwrite":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[68],"tags":[12,53],"class_list":["post-3051","post","type-post","status-publish","format-standard","hentry","category-developer","tag-developer","tag-vscode"],"jetpack_shortlink":"https:\/\/wp.me\/pbVg43-Nd","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/posts\/3051","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/comments?post=3051"}],"version-history":[{"count":2,"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/posts\/3051\/revisions"}],"predecessor-version":[{"id":3053,"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/posts\/3051\/revisions\/3053"}],"wp:attachment":[{"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/media?parent=3051"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/categories?post=3051"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/tags?post=3051"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}