Coder Social home page Coder Social logo

vim-glsl's People

Contributors

alexshen avatar auxiliary-character avatar dustyleary avatar idbrii avatar krispykalsi avatar m-pilia avatar nchase avatar possiblyashrub avatar rkaup avatar sheerun avatar svenstaro avatar symaxion avatar voidus avatar voithos avatar w23 avatar znkr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

vim-glsl's Issues

Not working automatically

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?

Use within javascript strings

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!

No syntax highlight on neovim

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

Semi colon not working as expected in .fs files

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?

Add support .gs, .tcs, .tes

Did you consider adding these extensions for geometry, tesselation control and tesselation evaluation shaders ?

glsl file extension detection

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?

Upstreaming?

It looks like this code is relatively stable: any reason not to submit it upstream to vim?

Strange indentation behaviour with function calls in top-level definitions of multi-line arrays

Specifically, if

  • the last item in the array is a function call (i.e. has (...) at the end - note that it must have the ( as well as the ))
  • the last item in the array does not have a trailing ,
  • the array is defined at the first indentation level
  • the closing ); is on its own line

then 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.

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.