tikhomirov / vim-glsl Goto Github PK
View Code? Open in Web Editor NEWVim runtime files for OpenGL Shading Language
License: MIT License
Vim runtime files for OpenGL Shading Language
License: MIT License
Hi,
I installed this plugin using Vundle by following the vim awesome instructions.
But for some reason, it is not automatically highlighting my shader files.
Only works if I type manually autocmd! BufNewFile,BufRead *.vert,*.tesc,*.tese,*.glsl,*.geom,*.frag,*.comp set filetype=glsl
. Do you have any idea what is going on?
Apologies if this is obvious or has been asked, but is it possible to use vim-glsl with shaders that are written as js or ts strings?
For example:
export const shader = /* glsl */ `
void main() {
gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);
}`
I know that there is support for inlined html shaders but curious if that extends / can extend to other common shader locations. Thanks in advance!
I'm using this plugin on neovim but I get no syntax highlight. Everything else seems to be fine. Not sure if its due to my lsp configuration.
My vimrc.vim:
call plug#begin('~/.local/share/nvim/site/plugged')
Plug 'tikhomirov/vim-glsl'
call plug#end()
My init.lua
local vimrc = vim.fn.stdpath("config") .. "/vimrc.vim"
vim.cmd.source(vimrc)
vim.cmd([[
autocmd BufNewFile,BufRead *.vert,*.tesc,*.tese,*.glsl,*.geom,*.frag,*.comp set filetype=glsl
]])
Edit: Using treesitter I managed to get the highlighting on Neovim
I think it would be cool if this plugin expanded support for the newest functions and keywords in the new GLSL standards.
I've noticed that a semi-colon character is included in a word text object when editing fragment shaders but not vertex shaders. For example, pressing viw within a word in a .fs file will include a trailing semi-colon in the word. This seems to behave normally in .vs files.
Anyone else seeing this behavior or know what might be causing this?
Did you consider adding these extensions for geometry, tesselation control and tesselation evaluation shaders ?
Hello.
I'm having a lot of shaders with *.glsl file extension and somehow since last update your plugin does not support them anymore.
This is usefull to have glsl files, because you might have library files which could be used in *.vert and *.frag files. You combine them concatenated, but you will edit them separately. From the other side this is not good to rename all files in projects. Is it possible to restore *glsl files hightlights?
It looks like this code is relatively stable: any reason not to submit it upstream to vim?
Specifically, if
(
...)
at the end - note that it must have the (
as well as the )
),
);
is on its own linethen the line after the closing );
will be indented one tabstop further than it should be. If any of the above conditions are not met, indentation behaves as expected.
See the below video:
https://user-images.githubusercontent.com/46881987/151777293-b2116c88-c616-4046-bead-420b19cfcee4.mp4
Also note the double indentation of the array contents (and the closing );
), although this is not the focus of this issue.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.