Skip to content

Cursorline not extending to the beginning #999

@kurkale6ka

Description

@kurkale6ka

Problem

Hello,
Not sure why the cursorline seen here doesn't extend to the beginning.
What I noticed is that once nvim is running, if I redo :colo onedark, it's 'fixed':

In the test I used the one dark pro colorscheme

Image

Steps to reproduce

local lazypath = "/tmp/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", lazypath }
end
vim.opt.rtp:prepend(lazypath)
vim.opt.termguicolors = true

vim.wo.cursorline = true

require("lazy").setup ({
    {
        "lukas-reineke/indent-blankline.nvim",
        config = function()
            require("ibl").setup {}
        end,
    },
    -- uncomment this if the problem is related to scope
    -- {
    --     "nvim-treesitter/nvim-treesitter",
    --     build = ":TSUpdate",
    --     config = function()
    --         require("nvim-treesitter.configs").setup {
    --             ensure_installed = { "rust" }, -- change this to the language you use
    --         }
    --     end,
    -- },
    {
        'olimorris/onedarkpro.nvim',
        priority = 1000,
        opts = {
            colors = {
                onedark = {
                    -- https://github.com/navarasu/onedark.nvim/blob/master/lua/onedark/highlights.lua
                    bg = '#1f2329', -- palette/darker/bg0
                    cursorline = '#282c34', -- palette/darker/bg1
                },
            },
            highlights = {
                CursorLineNR = { fg = '#abb2bf' }, -- fg, highlights.lua: CursorLineNR -> fg
            },
            styles = {
                comments = 'italic',
                keywords = 'bold,italic',
                functions = 'italic',
                conditionals = 'italic',
            },
            plugins = {
                all = false,
                blink_cmp = true,
                gitsigns = true,
                hop = true,
                indentline = true,
                mason = true,
                nvim_tree = true,
                treesitter = true,
                trouble = true,
            },
            options = {
                cursorline = true,
            },
        },
    },
}, { root = "/tmp/lazy" })

In the example, I've opened a python file. It's enough to see the problem.

Expected behavior

cursorline to be the width of the whole screen

Neovim version (nvim -v)

NVIM v0.11.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions