Giter VIP home page Giter VIP logo

Comments (9)

rcarriga avatar rcarriga commented on August 18, 2024

I'm going to need a more info to debug properly. First check that :echo termguicolors prints 1, if not then I'm guessing the mac install has a runtime file that enables it where the linux one does not. If they're both 1 then please test with the following init.lua using nvim --clean -u min.lua

-- ignore default config and plugins
vim.opt.runtimepath:remove(vim.fn.expand("~/.config/nvim"))
vim.opt.packpath:remove(vim.fn.expand("~/.local/share/nvim/site"))
vim.opt.termguicolors = true

-- append test directory
local test_dir = "/tmp/nvim-config"
vim.opt.runtimepath:append(vim.fn.expand(test_dir))
vim.opt.packpath:append(vim.fn.expand(test_dir))

-- install packer
local install_path = test_dir .. "/pack/packer/start/packer.nvim"
local install_plugins = false

if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
  vim.cmd("!git clone https://github.com/wbthomason/packer.nvim " .. install_path)
  vim.cmd("packadd packer.nvim")
  install_plugins = true
end

local packer = require("packer")

packer.init({
  package_root = test_dir .. "/pack",
  compile_path = test_dir .. "/plugin/packer_compiled.lua",
})

packer.startup(function(use)
  -- Packer can manage itself
  use("wbthomason/packer.nvim")

  use("vim-test/vim-test")
  use({
    "nvim-neotest/neotest",
    requires = {
      "nvim-lua/plenary.nvim",
      "nvim-treesitter/nvim-treesitter",
      "antoinemadec/FixCursorHold.nvim",
      "nvim-neotest/neotest-python",
    },
    config = function()
      require("neotest").setup({
        adapters = { require("neotest-python") },
      })
    end,
  })

  if install_plugins then
    packer.sync()
  end
end)

vim.cmd[[
command! NeotestSummary lua require("neotest").summary.toggle()
command! NeotestFile lua require("neotest").run.run(vim.fn.expand("%"))
command! Neotest lua require("neotest").run.run(vim.fn.getcwd())
command! NeotestNearest lua require("neotest").run.run()
command! NeotestDebug lua require("neotest").run.run({ strategy = "dap" })
command! NeotestAttach lua require("neotest").run.attach()
]]

from neotest.

hahuang65 avatar hahuang65 commented on August 18, 2024

Weirdly... :echo termguicolors gives me a E121: Undefined variable: termguicolors...

I do have

opt.termguicolors = true   -- Enables 24-bit colors in the TUI. Uses `gui` highlights instead of `cterm`

in my init.lua though...

from neotest.

rcarriga avatar rcarriga commented on August 18, 2024

Ah sorry yep was supposed to be echo &termguicolors. Can you try with the init.lua above and see if you see the same?

from neotest.

hahuang65 avatar hahuang65 commented on August 18, 2024

This is weird... Now it's flipped for me. Arch Linux has color, Mac doesn't. I wonder if it has to do with nvim version...

This is with your config above on both machines.

from neotest.

rcarriga avatar rcarriga commented on August 18, 2024

What versions are you using? You could try with the app image from the GitHub releases https://github.com/neovim/neovim/releases on both

from neotest.

hahuang65 avatar hahuang65 commented on August 18, 2024

I'm building nightlies... So the versions will vary day by day.

Feel free to close this bug if you want, as it's not a deal breaking bug.

But if you keep it open, I'm happy to keep poking at it to see what's causing it.

I'll post here with any findings. I don't want to burden you any more with this issue.

from neotest.

rcarriga avatar rcarriga commented on August 18, 2024

I'll keep it open for now 👍 Please do update if you find the cause!

from neotest.

hahuang65 avatar hahuang65 commented on August 18, 2024

Weird... it seems random when I open nvim. Sometimes it gets color, other times it doesn't.

from neotest.

rcarriga avatar rcarriga commented on August 18, 2024

Going to close this as I haven't seen anyone else experience this issue so it's likely config related

from neotest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.