Coder Social home page Coder Social logo

vanity's People

Contributors

whatever555 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vanity's Issues

Can't set default color

  • WSL2
  • Windows Terminal Preview
  • Ubuntu 20.04
  • neovim :version
NVIM v0.5.0-dev+51936126d
Build type: Release
LuaJIT 2.0.5
Compilation: /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/linux/super/gcc-5 -DNDEBUG -Wall -Wextr
a -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wi
mplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DEC
LARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/tmp/neovim-20
210118-17138-107ogel/build/config -I/tmp/neovim-20210118-17138-107ogel/src -I/home/linuxbrew/.linuxbrew/include
 -I/tmp/neovim-20210118-17138-107ogel/deps-build/include -I/usr/include -I/tmp/neovim-20210118-17138-107ogel/bu
ild/src/nvim/auto -I/tmp/neovim-20210118-17138-107ogel/build/include

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/home/linuxbrew/.linuxbrew/Cellar/neovim/HEAD-5193612/share/nvim"
  • init.vim
let g:vanity_default_colors = {'allFiles': 'schellar'}

Issue
I'm getting the following error when attempting to set the default color.

:VanitySaveFavColor or `:VanitySetDefaultColor' both result in similar messages.

Error

Error detected while processing function SetDefaultColor[1]..SetDefaultColorForFiletype:
line    6:
E5060: Unknown flag: w
Press ENTER or type command to continue

vid

colos.mp4

newgif

what

image

default and favourites aren't consistently working

I'm creating a new issue. I initially assumed that it was related to Issue #3, but I've noticed less of the unknown flag w error and more of just general unpredictable behavior.

My current config in init.vim is:

let g:vanity_default_colors = { '': 'tuftish' }
let g:vanity_favourite_colors = {
    \ 'allFiles': [ 'tuftish', 'shades_of_purple' ],
    \ '': [ 'tuftish', 'shades_of_purple' ]
    \ }
  • :VanityRandomCol works as expected

  • :VanityLoadDefaultColorscheme loads a 256_noir, despite that not being defined in my vanity settings above

  • :VanityLoadFavouriteColorscheme returns: no favourites set for this file type. despite having the default rule set with '' above

:VanityNextCol and 'VanityPrevCol' are not consistently relying on my defaults or favourites.

Example

  • Open neovim
  • color scheme is 256_noir (shouldn't Vanity should apply the correct color scheme on start up?) I don't have an explicit :colorscheme tuftish in my init.vim but I expect that at least one of the colors defined in the vanity settings would load
  • I manually change to tuftish :colorscheme tuftish
  • :VanityNextCol changes the scheme to twilight256. (appears to be defining 'next' based on an alphabetical sorting of my installed color schemes)
  • :VanityPrevCol works sometimes. (I've seen it work and go back to tuftish, but I've also seen it go to another color scheme that hasn't even been enabled during that session. I'm not sure how to reproduce it not working though. (testing now, both prev and next are following the same order of schemes as I move back and forth.))

After replaying those steps above to confirm for my description on this ticket, I realized that prev and next are now toggling between tuftish and shades_of_purple. That seems strange because just a few minutes ago, next and prev would cycle through all installed colors.

The only action between my testing and then seeing prev next work correctly was that I called :Colors to search through all color schemes. Colors is part of fzf-vim plugin, which I have installed.

While the prev next functionality was still working correctly, I experimented with both VanitySaveFavColorForFileType and VanitySetDefaultColorForFiletype' for different files, (including the help buffer that was displaying details for :h Colors). I had three splits active, all visible on my screen: a plain text file t.txt, init.vim`, and the help buffer. I changed the color scheme manually to birds-of-a-feather and then tried the two save/set methods. This created havoc. vanity next prev suddenly only recognized the newly added birds-of-a-feather scheme. All color scheme changes were immediately applied to all buffers of all file types.

  • I'd like to view Vanity's in-memory settings to understand what happened, but don't see how to do that.
  • I'd also like to have an undo option in case that testing with birds-of-a-feather persists after restarting vim.

Anyway...

  • VanityCycleFavourites and VanityCycleFavouritesForFileType do nothing and don't log any messages

Ubuntu 21.04 (GNU/Linux 5.10.60.1-microsoft-standard-WSL2 x86_64)

:version
NVIM v0.7.0-dev
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -g -O2 -ffile-prefix-map=/build/neovim-A6azRf/neovim-0.6.0ubuntu1+git202112231249-7b8fbbdeb-adeb5640
f=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE
=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -W
shadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color
=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I
/build/neovim-A6azRf/neovim-0.6.0
ubuntu1+git202112231249-7b8fbbdeb-adeb5640f/build/config -I/build/neovim-A6azRf/neovim-0.6.0
ubuntu1+git202112231249-7b8fbbdeb-adeb5640f/src -I/build/neovim-A6azRf/neovim-0.6.0ubuntu1+git202112231249-7b8fbbdeb-adeb564
0f/.deps/usr/include -I/usr/include -I/build/neovim-A6azRf/neovim-0.6.0ubuntu1+git202112231249-7b8fbbdeb-adeb5640f/build/src/
nvim/auto -I/build/neovim-A6azRf/neovim-0.6.0
ubuntu1+git202112231249-7b8fbbdeb-adeb5640f/build/include
Compiled by buildd@lgw01-amd64-057

Features: +acl +iconv +tui
See ":help feature-compile"

system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/share/nvim"

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.