shaunsingh / nord.nvim

Neovim theme based off of the Nord Color Palette, written in lua with tree sitter support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

conflicts with lualine when configured directly with lua

glyh opened this issue · comments

Here's the init.lua:

-- this template is borrowed from nvim-lspconfig
local on_windows = vim.loop.os_uname().version:match("Windows")

vim.env['GITHUB'] = vim.env['GITHUB'] or 'www.github.com'

local function join_paths(...)
    local path_sep = on_windows and "\\" or "/"
    local result = table.concat({ ... }, path_sep)
    return result
end

vim.cmd([[set runtimepath=$VIMRUNTIME]])

local temp_dir
if on_windows then
    temp_dir = vim.loop.os_getenv("TEMP")
else
    temp_dir = "/tmp"
end

vim.cmd("set packpath=" .. join_paths(temp_dir, "nvim", "site"))

local package_root = join_paths(temp_dir, "nvim", "site", "pack")
local install_path = join_paths(package_root, "packer", "start", "packer.nvim")
local compile_path = join_paths(install_path, "plugin", "packer_compiled.lua")

local function load_plugins()
    -- only add other plugins if they are necessary to reproduce the issue
    require("packer").startup({
        {
            "wbthomason/packer.nvim",
              { 'shaunsingh/nord.nvim',
            config = function()
              vim.g.nord_contrast = true
              vim.g.nord_borders = false
              vim.g.nord_disable_background = false
              vim.g.nord_italic = false
              vim.g.nord_uniform_diff_background = true
              require('nord').set()
            end,
          },

  { 'nvim-lualine/lualine.nvim',
    requires = 'kyazdani42/nvim-web-devicons',
    config = function()
      require('lualine').setup({
        options = { theme = 'nord' }
      })
    end
  }



        },
        config = {
            package_root = package_root,
            compile_path = compile_path,
            git = { default_url_format = 'https://' .. vim.env['GITHUB'] .. '/%s' }
        },
    })
end

if vim.fn.isdirectory(install_path) == 0 then
    vim.fn.system({ "git", "clone", 'https://' .. vim.env['GITHUB'] .. '/wbthomason/packer.nvim', install_path })
end
load_plugins()
-- require("packer").sync()

vim.cmd([[ set completeopt=menu,menuone,noselect]])

And I got this:
image

But if I directly call vim.cmd([[colors nord]]), there would be no problem.

image

Try this

use {
  "nvim-lualine/lualine.nvim",
  requires = { "kyazdani42/nvim-web-devicons", opt = true },
  after = "nord.nvim",
}

Thank you, it's working now.