talha-akram / noctis.nvim

Neovim port of noctis family of themes (https://github.com/liviuschera/noctis)
56 stars 6 forks source link

Unable to configure with `folke/lazy.nvim` #3

Closed peterjamesmatthews closed 1 year ago

peterjamesmatthews commented 1 year ago

I'm having difficulty setting this up with folke/lazy.nvim.

Here's a minimal reproducing init.lua

-- see 📦 Installation (https://github.com/folke/lazy.nvim#-installation)
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "https://github.com/folke/lazy.nvim.git",
    "--branch=stable", -- latest stable release
    lazypath,
  })
end
vim.opt.rtp:prepend(lazypath)

-- see 🔌 Plugin Spec (https://github.com/folke/lazy.nvim#-plugin-spec)
plugins = {
  {
    "talha-akram/noctis.nvim",
    priority = 1000,
    config = function()
      vim.cmd.colorscheme("noctis")
    end
  }
}

-- see ⚙️ Configuration https://github.com/folke/lazy.nvim#%EF%B8%8F-configuration
opts = {}

require("lazy").setup(plugins, opts)

The plugin appears to be installing correctly, but calling colorscheme with any of the noctis options breaks highlighting:

https://github.com/talha-akram/noctis.nvim/assets/39538287/ea23fc9c-e5bf-4e73-995a-bb799d68863e

I'm a big fan of noctis, so thank you for making this port @talha-akram!

talha-akram commented 1 year ago

Thank you for reporting this issue @peterjamesmatthews. Can you please share the name of your terminal program and the output of echo $TERM? Also this extension requires vim.o.termguicolors = true.

peterjamesmatthews commented 1 year ago

I'm using wezterm and my $TERM is set to xterm-256color.

Didn't realize the vim.o.termguicolors = true assumption. It's looking a lot better now!

There's still some differences comparing it side by side w/my VSCode:

nvim VSCode
Screenshot 2023-07-12 at 6 58 18 PM Screenshot 2023-07-12 at 6 57 36 PM

I don't have a lua LSP setup yet, so I suspect that treesitter just doesn't know how to highlight those symbols correctly.

talha-akram commented 1 year ago

Yup, the colorscheme application will differ from VS Code especially since VS Code can use the LSP information to further enrich the applied theme but I am glad that the theme is working for you so I'll be closing this issue now 🙂.