Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add Odin lang icon #521

Closed
wants to merge 2 commits into from
Closed

feat: add Odin lang icon #521

wants to merge 2 commits into from

Conversation

shizeeg
Copy link
Contributor

@shizeeg shizeeg commented Dec 11, 2024

added a filetype icon for https://odin-lang.org/

@hasecilu
Copy link
Collaborator

There is a glyph that can be used, I think it similar enough, the advantage is that it's bigger than the letter (the glyphs on my font I use double space).

Remember to run make.

image

@shizeeg
Copy link
Contributor Author

shizeeg commented Dec 12, 2024

I took the glyph from the starship.rs config it looks the same size as the other glyphs in the filetype table, plus it's possible to change the icon via .set_icon() via init.lua anyway.

@hasecilu
Copy link
Collaborator

Probably your font don't use double-wide Nerd Font glyphs but the people that use it may want to have the glyphs bigger, specially when using small font size.

@shizeeg
Copy link
Contributor Author

shizeeg commented Dec 12, 2024

should I change it and open another PR?

@hasecilu
Copy link
Collaborator

hasecilu commented Dec 12, 2024

In this PR, I used nf-md-null glyph. You can send the new commits here and I'll squash them.

Copy link
Member

@alex-courtis alex-courtis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks for fixing this one

Copy link
Collaborator

@hasecilu hasecilu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also run make

@shizeeg
Copy link
Contributor Author

shizeeg commented Dec 13, 2024

Also run make

I did. It failed somewhere in LSP since I'm not a Lua dev I have no idea what's wrong.

nvim \
	--clean \
	--headless \
	--cmd "set rtp^=vim-colortemplate" \
	-c 'source scripts/generate_colors.lua' \
	-c 'qall'
Error detected while processing command line..script /home/shizeeg/proj/nvim-web-devicons/scripts/generate_colors.lua:
E5113: Error while calling lua chunk: vim/_editor.lua:0: command line..script /home/shizeeg/proj/nvim-web-devicons/scripts/generate_colors.lua..nvim_exec2() called at /home/shizeeg/proj/nvim-web-devicons/scripts/generate_colors.lua:0..BufReadPost Autocommands for "*": Vim(append):Error executing lua callback: /usr/share/nvim/runtime/filetype.lua:36: command line..script /home/shizeeg/proj/nvim-web-devicons/scripts/generate_colors.lua..nvim_exec2() called at /home/shizeeg/proj/nvim-web-devicons/scripts/generate_colors.lua:0..BufReadPost Autocommands for "*"..FileType Autocommands for "*"..function <SNR>1_LoadFTPlugin[20]..script /usr/share/nvim/runtime/ftplugin/lua.lua: Vim(runtime):E5113: Error while calling lua chunk: /usr/share/nvim/runtime/lua/vim/treesitter.lua:415: Parser could not be created for buffer 1 and language "lua"
stack traceback:
	[C]: in function 'assert'
	/usr/share/nvim/runtime/lua/vim/treesitter.lua:415: in function 'start'
	/usr/share/nvim/runtime/ftplugin/lua.lua:2: in main chunk
	[C]: in function 'nvim_cmd'
	/usr/share/nvim/runtime/filetype.lua:36: in function </usr/share/nvim/runtime/filetype.lua:35>
	[C]: in function 'pcall'
	vim/shared.lua: in function <vim/shared.lua:0>
	[C]: in function '_with'
	/usr/share/nvim/runtime/filetype.lua:35: in function </usr/share/nvim/runtime/filetype.lua:10>
	[C]: in function 'nvim_exec2'
	vim/_editor.lua: in function 'cmd'
	...izeeg/proj/nvim-web-devicons/scripts/generate_colors.lua:125: in main chunk
stack traceback:
	[C]: in function '_with'
	/usr/share/nvim/runtime/filetype.lua:35: in function </usr/share/nvim/runtime/filetype.lua:10>
	[C]: in function 'nvim_exec2'
	vim/_editor.lua: in function 'cmd'
	...izeeg/proj/nvim-web-devicons/scripts/generate_colors.lua:125: in main chunk
stack traceback:
	[C]: in function 'nvim_exec2'
	vim/_editor.lua: in function 'cmd'
	...izeeg/proj/nvim-web-devicons/scripts/generate_colors.lua:125: in main chunkstylua . --check
luacheck lua scripts
Checking lua/nvim-web-devicons.lua                �[0m�[32m�[1mOK�[0m
Checking lua/nvim-web-devicons/hi-test.lua        �[0m�[32m�[1mOK�[0m
Checking lua/nvim-web-devicons/icons-default.lua  �[0m�[32m�[1mOK�[0m
Checking lua/nvim-web-devicons/icons-light.lua    �[0m�[32m�[1mOK�[0m
Checking scripts/generate_colors.lua              �[0m�[32m�[1mOK�[0m

Total: �[0m�[0m�[1m0�[0m warnings / �[0m�[0m�[1m0�[0m errors in 5 files

@alex-courtis
Copy link
Member

hasecilu added a commit that referenced this pull request Dec 13, 2024
Co-authored-by: hasecilu <hasecilu@tuta.io>
hasecilu added a commit that referenced this pull request Dec 13, 2024
Co-authored-by: hasecilu <hasecilu@tuta.io>
@hasecilu
Copy link
Collaborator

Not sure why you have errors, anyway I couldn't force push to this PR maybe because this PR was made from your main branch? and since I can not push directly to main branch I made #524. Thanks for the contribution.

@hasecilu hasecilu closed this Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants