diff options
| author | Mitja Felicijan <m@mitjafelicijan.com> | 2023-10-23 02:40:17 +0200 |
|---|---|---|
| committer | Mitja Felicijan <m@mitjafelicijan.com> | 2023-10-23 02:40:17 +0200 |
| commit | d50ea4053ea04abb3a455606d4591a8283af0677 (patch) | |
| tree | f90a218d149abaadc8b2a44cefc00266e5c1838f | |
| parent | 93eda3eaadcc87cf474705e909e81e95042481f1 (diff) | |
| download | mitjafelicijan.com-d50ea4053ea04abb3a455606d4591a8283af0677.tar.gz | |
Cleanup
| -rw-r--r-- | config.yaml | 3 | ||||
| -rw-r--r-- | content/posts/2023-05-22-crafting-stories-in-zed-editor.md | 89 | ||||
| -rw-r--r-- | templates/base.html | 8 |
3 files changed, 6 insertions, 94 deletions
diff --git a/config.yaml b/config.yaml index 6fcd3bd..16f8ffd 100644 --- a/config.yaml +++ b/config.yaml | |||
| @@ -5,7 +5,8 @@ language: "en-us" | |||
| 5 | 5 | ||
| 6 | # Code highlighting. | 6 | # Code highlighting. |
| 7 | # https://swapoff.org/chroma/playground/ | 7 | # https://swapoff.org/chroma/playground/ |
| 8 | highlighting: "pygments" | 8 | # highlighting: "pygments" |
| 9 | highlighting: "vs" | ||
| 9 | 10 | ||
| 10 | # Minifies output HTML (including inline CSS, JS). | 11 | # Minifies output HTML (including inline CSS, JS). |
| 11 | minify: true | 12 | minify: true |
diff --git a/content/posts/2023-05-22-crafting-stories-in-zed-editor.md b/content/posts/2023-05-22-crafting-stories-in-zed-editor.md deleted file mode 100644 index 86be7c8..0000000 --- a/content/posts/2023-05-22-crafting-stories-in-zed-editor.md +++ /dev/null | |||
| @@ -1,89 +0,0 @@ | |||
| 1 | --- | ||
| 2 | title: From General Zod to Superman - Crafting Stories in Zed Editor | ||
| 3 | url: crafting-stories-in-zed-editor.html | ||
| 4 | date: 2023-05-22T12:00:00+02:00 | ||
| 5 | type: post | ||
| 6 | draft: false | ||
| 7 | --- | ||
| 8 | |||
| 9 | Pretentious title! Good start! I have nothing to add to this discussion. I just | ||
| 10 | like this editor and wanted to write something here that will remind me to use | ||
| 11 | it again in a while when/if it becomes available for Linux. | ||
| 12 | |||
| 13 | **TLDR:** I think this code editor is very cool and has a massive potential. I | ||
| 14 | hope they don’t mess up with adding a plugin ecosystem to it! | ||
| 15 | |||
| 16 | Out of morbid curiosity, I started using the [Zed editor](https://zed.dev/) on | ||
| 17 | my Mac. Zed is a high-performance, multiplayer code editor developed by the | ||
| 18 | creators of Atom and Tree-sitter. Written in Rust so it has to be blazingly | ||
| 19 | fast! 😊 It's a joke, calm down. | ||
| 20 | |||
| 21 | Over the past year, I have switched between [Helix | ||
| 22 | editor](https://helix-editor.com/) and [VS | ||
| 23 | Code](https://code.visualstudio.com/), but for the last couple of months, I have | ||
| 24 | been using Helix exclusively. | ||
| 25 | |||
| 26 | I've been genuinely impressed by Zed. When you open a file, it automatically | ||
| 27 | detects its type and downloads the corresponding [LSP (language | ||
| 28 | server)](https://en.wikipedia.org/wiki/Language_Server_Protocol). The list of | ||
| 29 | supported languages is not extensive, but it's still impressive. It's a great | ||
| 30 | example of how to create a product that stays out of your way. | ||
| 31 | |||
| 32 |  | ||
| 33 | C code on a light theme. | ||
| 34 | |||
| 35 | For C development it downloaded [clangd](https://clangd.llvm.org/) and setting | ||
| 36 | up missing dependencies in code was rather easy. For this project I use | ||
| 37 | [SDL2](https://www.libsdl.org/) for rendering terminal emulator. It’s a hobby | ||
| 38 | project, don’t worry about it. | ||
| 39 | |||
| 40 | If you are going to give this a try and you are using C, I suggest checking two | ||
| 41 | files in the root of your project folder. If you don't have them, create them. | ||
| 42 | |||
| 43 | **compile_flags.txt** | ||
| 44 | |||
| 45 | ``` | ||
| 46 | -I/opt/homebrew/include | ||
| 47 | -I/opt/homebrew/include/SDL2 | ||
| 48 | ``` | ||
| 49 | |||
| 50 | Easy way of checking what the appropriate includes for a specific library is to | ||
| 51 | use `pkg-config` and in my case `pkg-config SDL2 --cflags-only-I`. But this is | ||
| 52 | nothing new to C/C++ devs. Just a noter for people who are using Visual Studio. | ||
| 53 | |||
| 54 | **.clang-format** | ||
| 55 | |||
| 56 | ``` | ||
| 57 | ColumnLimit: 220 | ||
| 58 | BasedOnStyle: Mozilla | ||
| 59 | ``` | ||
| 60 | |||
| 61 | I prefer Mozilla coding style for C so you can set that up. | ||
| 62 | |||
| 63 | They really have something special here. Although there is no version available | ||
| 64 | for Linux yet, I will stick to Helix. This impressive piece of engineering is, | ||
| 65 | above all, an amazing example of craftsmanship. | ||
| 66 | |||
| 67 | They have a bunch of amazing integrated functionalities like live desktop | ||
| 68 | sharing, code sharing in a live coding session. There is a lot of pretentious | ||
| 69 | marketing speak there but the product is still amazing! | ||
| 70 | |||
| 71 | For me the speed and the simplicity of the product was the most impressive | ||
| 72 | thing. You get that: it just works feeling. A rare thing in 2023. | ||
| 73 | |||
| 74 |  | ||
| 75 | |||
| 76 | They also managed to add [Github Copilot](https://github.com/features/copilot) | ||
| 77 | in a non obtrusive way. To me, everything feels very intentional and | ||
| 78 | specifically selected. It's minimal yet maximally effective. | ||
| 79 | |||
| 80 | <video src="https://zed.dev/img/post/copilot/copilot-demo.webm" autoplay loop></video> | ||
| 81 | |||
| 82 | It is a perfect balance between VS Code, Jetbrains IDE’s and something like VIM | ||
| 83 | or Helix. | ||
| 84 | |||
| 85 | I just hope they **DON’T** add plugin support and keep it like it is. They as a | ||
| 86 | vendor should add stuff to it with great deliberation and thought. And this way | ||
| 87 | the product will stay fast and focused. That’s my two cents. | ||
| 88 | |||
| 89 | Amazing job! | ||
diff --git a/templates/base.html b/templates/base.html index 9f5f882..072b5b8 100644 --- a/templates/base.html +++ b/templates/base.html | |||
| @@ -16,7 +16,7 @@ | |||
| 16 | <style> | 16 | <style> |
| 17 | body { | 17 | body { |
| 18 | padding: 1rem; | 18 | padding: 1rem; |
| 19 | max-width: 700px; | 19 | max-width: 760px; |
| 20 | background: white; | 20 | background: white; |
| 21 | font-family: sans-serif; | 21 | font-family: sans-serif; |
| 22 | line-height: 1.35rem; | 22 | line-height: 1.35rem; |
| @@ -46,6 +46,7 @@ | |||
| 46 | 46 | ||
| 47 | table { | 47 | table { |
| 48 | max-width: 100%; | 48 | max-width: 100%; |
| 49 | width: 100%; | ||
| 49 | border-collapse: separate; | 50 | border-collapse: separate; |
| 50 | border-spacing: 2px; | 51 | border-spacing: 2px; |
| 51 | border: 1px solid black; | 52 | border: 1px solid black; |
| @@ -81,18 +82,17 @@ | |||
| 81 | text-wrap: nowrap; | 82 | text-wrap: nowrap; |
| 82 | overflow-x: auto; | 83 | overflow-x: auto; |
| 83 | padding: 0 1em; | 84 | padding: 0 1em; |
| 84 | background: floralwhite; | 85 | border: 1px solid gainsboro; |
| 85 | } | 86 | } |
| 86 | 87 | ||
| 87 | code { | 88 | code { |
| 88 | background: floralwhite; | ||
| 89 | padding: 0 3px; | 89 | padding: 0 3px; |
| 90 | font-size: 14px; | 90 | font-size: 14px; |
| 91 | border: 0; | ||
| 91 | } | 92 | } |
| 92 | 93 | ||
| 93 | pre code { | 94 | pre code { |
| 94 | line-height: 1.3em; | 95 | line-height: 1.3em; |
| 95 | background: initial; | ||
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | pre, code, pre *, code * { | 98 | pre, code, pre *, code * { |
