From c9a4ec617b259365e9348c8b761d87905b64d313 Mon Sep 17 00:00:00 2001 From: Dung Huynh Duc <> Date: Mon, 22 Jul 2024 22:02:46 +0800 Subject: [PATCH] feat: add example for LSP with tailwindcss --- README.md | 15 +++++++++++++-- keymap.json | 1 + settings.json | 8 ++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a2fe77e..4d8e098 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Update your settings.json file with the following configuration: ```json -// settings.json, generated at Wed Jul 17 2024 21:03:50 GMT+0800 (Singapore Standard Time) +// settings.json, generated at Mon Jul 22 2024 22:02:16 GMT+0800 (Singapore Standard Time) // Zed settings // // For information on how to configure Zed, see the Zed @@ -80,6 +80,14 @@ Update your settings.json file with the following configuration: "inlay_hints": { "enabled": true }, + // LSP + "lsp": { + "tailwindcss-language-server": { + "settings": { + "classAttributes": ["class", "className", "ngClass", "styles"] + } + } + }, "languages": { // Refer https://zed.dev/docs/languages/javascript and https://zed.dev/docs/languages/typescript for more info "TypeScript": { @@ -121,6 +129,7 @@ Update your settings.json file with the following configuration: "dock": "right" } } + ``` @@ -136,7 +145,7 @@ Update your keymap.json file with the following key bindings: ```json -// keymap.json, generated at Wed Jul 17 2024 21:03:50 GMT+0800 (Singapore Standard Time) +// keymap.json, generated at Mon Jul 22 2024 22:02:16 GMT+0800 (Singapore Standard Time) [ { "context": "Editor && (vim_mode == normal || vim_mode == visual) && !VimWaiting && !menu", @@ -180,6 +189,7 @@ Update your keymap.json file with the following key bindings: // +LSP "space c a": "editor::ToggleCodeActions", + "space .": "editor::ToggleCodeActions", "space c r": "editor::Rename", "g d": "editor::GoToDefinition", "g D": "editor::GoToDefinitionSplit", @@ -320,6 +330,7 @@ Update your keymap.json file with the following key bindings: // } // } ] + ``` diff --git a/keymap.json b/keymap.json index f59301b..dc579d9 100644 --- a/keymap.json +++ b/keymap.json @@ -41,6 +41,7 @@ // +LSP "space c a": "editor::ToggleCodeActions", + "space .": "editor::ToggleCodeActions", "space c r": "editor::Rename", "g d": "editor::GoToDefinition", "g D": "editor::GoToDefinitionSplit", diff --git a/settings.json b/settings.json index 455c785..b1ea9ce 100644 --- a/settings.json +++ b/settings.json @@ -46,6 +46,14 @@ "inlay_hints": { "enabled": true }, + // LSP + "lsp": { + "tailwindcss-language-server": { + "settings": { + "classAttributes": ["class", "className", "ngClass", "styles"] + } + } + }, "languages": { // Refer https://zed.dev/docs/languages/javascript and https://zed.dev/docs/languages/typescript for more info "TypeScript": {