# `failwind.nvim`: Options *Continuation of [[failwind.nvim - Introduction]].* Quick refresher: failwind.nvim is a half-meme, half-tryhard project to make CSS look like a really appealing configuration language for Neovim. I have currently have implemented support for keymaps, autocommands, options and (in combination with all of the above) plugin installation and configuration. It's a 'general purpose' configuration language, in the sense that nothing is hard coded on the `failwind.nvim` side to make certain plugins easier to configure - instead just providing generic tools that allow easy configurtion (in CSS). # Options Options in `failwind` are actually very simple, you can see each of the primary option data types used below. ```neovim {"update":true,"path":"_/code/17242536270462.css","timestamp":1725472686793} <pre> <span class="Tag"><span class="-type">options</span></span> <span class="Delimiter">{</span> <span class="-property">number</span><span class="Delimiter">:</span> <span class="String">true</span><span class="Delimiter">;</span> <span class="-property">clipboard</span><span class="Delimiter">:</span> <span class="String">'unnamedplus'</span><span class="Delimiter">;</span> <span class="-property">updatetime</span><span class="Delimiter">:</span> <span class="-number">250</span><span class="Delimiter">;</span> <span class="-property">runtimepath</span><span class="Delimiter">:</span> <span class="Delimiter">[</span><span class="String">&quot;/foo/bar&quot;</span><span class="Delimiter">,</span> <span class="String">&quot;/other/path&quot;</span><span class="Delimiter">]</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> </pre> ``` ^1724253627046 There's support for booleans, strings, numbers and even arrays of said data types! If you put this in an `init.css` file that is in your `~/.config/nvim/` folder, it will automatically be sourced and the options will be set for your Neovim. # Options: Filetypes However, we can do even better than this! Using builtin nested CSS features, we can actually set options for particular filetypes. ```neovim {"update":true,"path":"_/code/17242536270451.css","timestamp":1725472686568} <pre> <span class="Tag"><span class="-type">options</span></span> <span class="Delimiter">{</span> <span class="Comment"><span class="-spell">/* ... Other options ... */</span></span> <span class="Tag"><span class="-type">css</span></span> <span class="Delimiter">{</span> <span class="-property">expandtab</span><span class="Delimiter">:</span> <span class="String">true</span><span class="Delimiter">;</span> <span class="-property">shiftwidth</span><span class="Delimiter">:</span> <span class="-number">2</span><span class="Delimiter">;</span> <span class="-property">tabstop</span><span class="Delimiter">:</span> <span class="-number">2</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> <span class="Tag"><span class="-type">lua</span></span><span class="Delimiter">,</span> <span class="Tag"><span class="-type">javascript</span></span><span class="Delimiter">,</span> <span class="Tag"><span class="-type">typescript</span></span> <span class="Delimiter">{</span> <span class="-property">tabstop</span><span class="Delimiter">:</span> <span class="-number">2</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> <span class="Delimiter">}</span> </pre> ``` ^1724253627045 This sets one set of options for `css` files, and then sets the `tabstop` value for `lua`, `javascript`, and `typescript` in one single block. Whenever you enter a matching file, `failwind` will apply those settings directly for that file. # Options: Importing Lastly, options don't have to be manually configured by yourself (like it's 2023! come on man, it's 2024 now!). Instead you can import option values from any matching `failwind` style configuration. For example: ```neovim {"update":true,"path":"_/code/17242536270430.css","timestamp":1725472686340} <pre> <span class="-keyword">@import</span> <span class="-function">url</span><span class="Delimiter">(</span><span class="String">&quot;tjdevries/kickstart.css&quot;</span><span class="Delimiter">)</span> options<span class="Delimiter">;</span> </pre> ``` ^1724253627043 This will import the `init.css` file from `github.com/tjdevries/kickstart.css`, and apply **only** the options values from that configuration. Of course you could import multiple option configurations to layer them on top of each other to get a seamless and easy options configuration in no time at all. # Next up Next I'll probably write a bit more about plugin configuration, so make sure to follow along for more goofiness! Thanks