Skip to content

AdrianETP/AutoColor.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 

Repository files navigation

Autocolor

  • This is a plugin made to change neovim themes based on what filetype you are on

install

for vimplug

Plug 'Adrianetp/AutoColor'

for packer

use('Adrianetp/AutoColor')

Setup

local ok , autocolor = pcall(require, 'autoColor')
if not ok then 
    return 
end 
autocolor.setup({})
  • The setup function will contain a table that modifies the colorscheme based on the filetype

Example

local ok , autocolor = pcall(require , "autoColor") 

if not ok then 
    return 
end

autocolor.setup({
    {
        language = "*.default", -- default means any filetype not declared on setup
        transparent = true, -- if you want no background (default false)
        theme = "nightfox" --theme name 
    },
    {
        language = "*.lua", -- file extension
        theme = "lunar"
    },
    {
        language = {"*.js","*.html","*.astro"},  -- you can also pass tables with file entensions
        theme = "lunar"
        -- you can leave the transparent variable out
    },
    {
        language = "*.cpp",
        theme = "gruvbox"
    }
})

Important notes

  • All themes declared in setup must be installed