Neovim can be themed using the Noctalia via the base16 colorscheme.

Setup

  1. Enable User Templates in Noctalia:
    • Open Settings → Color Scheme → Templates → Advanced → Enable User Templates
  2. Add a user template for neovim
    • Copy this into /.config/noctalia/user-templates.toml
     [templates.nvim-base16]
     input_path = "~/.config/nvim/lua/matugen-template.lua"
     output_path = "~/.config/nvim/lua/matugen.lua"
     post_hook = 'pkill -SIGUSR1 nvim'
    
  3. Install the base16 colorscheme by RRethy, using your package manager of choice. e.g. with Lazy:

     return { 'RRethy/base16-nvim',
       config = function()
         require('matugen').setup()
       end,
     }
    
  4. Add the template to your neovim configuration: Add the following file to you neovim configuration (in ~/.config/nvim/lua/matugen-template.lua, as above):

     local M = {}
    
     function M.setup()
       require('base16-colorscheme').setup {
         -- Background tones
         base00 = '', -- Default Background
         base01 = '', -- Lighter Background (status bars)
         base02 = '', -- Selection Background
         base03 = '', -- Comments, Invisibles
         -- Foreground tones
         base04 = '', -- Dark Foreground (status bars)
         base05 = '', -- Default Foreground
         base06 = '', -- Light Foreground
         base07 = '', -- Lightest Foreground
         -- Accent colors
         base08 = '', -- Variables, XML Tags, Errors
         base09 = '', -- Integers, Constants
         base0A = '', -- Classes, Search Background
         base0B = '', -- Strings, Diff Inserted
         base0C = '', -- Regex, Escape Chars
         base0D = '', -- Functions, Methods
         base0E = '', -- Keywords, Storage
         base0F = '', -- Deprecated, Embedded Tags
       }
     end
    
     -- Register a signal handler for SIGUSR1 (matugen updates)
     local signal = vim.uv.new_signal()
     signal:start(
       'sigusr1',
       vim.schedule_wrap(function()
         package.loaded['matugen'] = nil
         require('matugen').setup()
       end)
     )
    
     return M
    

    The setup function applies the theme, while the signal handler clears the old theme module out of the lua cache, then applies the new theme, whenever nvim is signalled with SIGUSR1.

  5. Setup base16 in your init.lua

     require('matugen').setup()
    

    When you restart neovim, it should use your noctalia theme.


This site uses Just the Docs, a documentation theme for Jekyll.