tokyonight.nvim

repository·main·Indexed 27 days ago

https://github.com/folke/tokyonight.nvim

A Lua-based color scheme for Neovim ported from Visual Studio Code, featuring Moon, Storm, Night, and Day variants. It includes specialized support for numerous Neovim plugins and provides configuration extras for external tools such as terminal emulators (Ghostty, Alacritty, Kitty), CLI tools (aider, eza), and other editors like Vim and Helix.

Tokens
3.6K
Snippets
12
Records
26
Agent score
93%

What's inside tokyonight.nvim

  1. Overview of Tokyo Night

    main
    Tokyo Night is a dark and light Neovim theme written in Lua. It is a port of the Visual Studio Code TokyoNight theme and includes extra themes for terminal emulators and shells such as Kitty, Alacritty, iTerm, and Fish.
  2. Configure Tokyo Night theme for Ghostty terminal

    main

    To use Tokyo Night themes in the Ghostty terminal, follow these steps:

    1. Create the themes directory: ~/.config/ghostty/themes.
    2. Download the desired Tokyo Night theme file into that themes directory.
    3. Open your Ghostty configuration file at ~/.config/ghostty/config.
    4. Set the theme option to the name of the downloaded file.

    To see a full list of available themes recognized by your Ghostty installation, run the following command in your terminal: ghostty +list-themes

    theme = "tokyonight_night"
  3. Apply Tokyo Night colors in Termux

    main

    To use Tokyo Night color schemes within the Termux terminal emulator, you must manually update the Termux color properties file.

    1. Select your preferred Tokyo Night flavor.
    2. Copy the contents of the corresponding tokyonight_flavour.properties file to ~/.termux/colors.properties.
    3. Apply the changes by running the termux-reload-settings command or by restarting the Termux application.
  4. Install Tokyo Night for Gemini CLI

    main

    To use Tokyo Night colors in the Gemini CLI, you must configure the ui.theme property in your settings.json file.

    Settings File Locations:

    • Linux/macOS: ~/.gemini/settings.json
    • Windows: %USERPROFILE%\.gemini\settings.json

    Method 1: Using an absolute path Point the ui.theme property to the absolute path of your chosen .json theme file.

    Method 2: Using customThemes Copy the contents of the theme JSON file into the ui.customThemes object in your settings.json, then set ui.theme to the name of that custom theme.

    {
      "ui": {
        "theme": "/absolute/path/to/tokyonight_night.json"
      }
    }
  5. Install tokyonight.nvim

    main

    Install the theme using your preferred Neovim package manager. If using lazy.nvim, ensure lazy = false and priority = 1000 are set so the theme loads immediately.

    {
      "folke/tokyonight.nvim",
      lazy = false,
      priority = 1000,
      opts = {},
    }
  6. Use Tokyonight themes with eza

    main

    To apply Tokyonight themes to eza (a modern replacement for ls), you must provide a theme configuration file at the expected location for your operating system.

    Linux/Unix: Copy the theme .yml file to ~/.config/eza/theme.yml.

    macOS: eza looks for the theme file in ~/Library/Application Support/eza by default.

    You can override the default configuration directory on macOS by setting the EZA_CONFIG_DIR environment variable.

  7. Apply Tokyo Night colors to st (suckless terminal)

    main

    To use Tokyo Night colors in the st terminal, you must replace the color definitions in your st build's config.h with the contents of one of the provided flavor header files from this repository.

    1. Choose your flavour.
    2. Copy the contents of `flavor.h` and replace into your st build's `config.h`.
    3. Then `make install` it in st folder.
  8. Install Tokyo Night for Vim

    main

    To use Tokyo Night as a Vim colorscheme, clone the repository locally and add the Vim extra directory to your runtime path (rtp).

    1. Clone the repository:
      git clone https://github.com/folke/tokyonight.nvim ~/projects/tokyonight.nvim
    2. Configure your ~/.vimrc to include the path to the Vim extras and set the colorscheme.
    set termguicolors
    set rtp+=~/projects/tokyonight.nvim/extras/vim
    colorscheme tokyonight
  9. Use Tokyo Night with Tailwind CSS v4

    main

    To use the Tokyo Night theme in a Tailwind CSS v4 project, follow these steps:

    1. Copy the theme files: Copy the .css files (e.g., tokyonight_day.css, tokyonight_moon.css, etc.) into your project directory.
    2. Import the theme: In your main CSS entry point (the file containing @import "tailwindcss";), import the desired Tokyo Night theme file(s).
    3. Apply colors: Use the generated color utility classes in your HTML/templates. The classes follow the pattern [property]-[theme-name]-[color-role] (e.g., bg-tokyonight-moon-bg).
    /* styles.css */
    @import "tailwindcss";
    
    @import "./tokyonight_day.css";
    @import "./tokyonight_moon.css";
    @import "./tokyonight_night.css";
    @import "./tokyonight_storm.css";
    
    /* Usage in HTML */
    <button class="border border-tokyonight-moon-border bg-tokyonight-moon-bg text-tokyonight-moon-fg">
      Click me!
    </button>
  10. Use Tokyo Night themes in aider

    main

    To apply Tokyo Night themes to the aider CLI tool, copy the contents of the theme's .yml file into your .aider.conf.yml file.

    Depending on your needs, the .aider.conf.yml file can be placed in different locations to achieve different scopes:

    • Global (per-user)
    • Per-repository
    • Per-directory

    Refer to the official aider documentation for details on configuration file locations.