SmiteshP / nvim-gps

Simple statusline component that shows what scope you are working inside
Apache License 2.0
478 stars 47 forks source link

feat: add support for C# #81

Closed hat0uma closed 2 years ago

hat0uma commented 2 years ago

Add support for C#

hat0uma commented 2 years ago

I checked with this.

code snippets ```csharp namespace test_namespace { class test_class { // method int test_method( int a) { return 1; } public readonly double test_expression_bodied_method(a) => a + 1; // property int test_property { set{ a = 1;} get{ return a;} } public readonly double test_expession_bodied_property => x + y; } interface test_interface { } record test_record { public string test_method() { var test = 1; var test_lambda = () => { test1(); }; return ""; } } } ```
Dockerfile ```Dockerfile FROM anatolelucet/neovim:0.6.1-ubuntu RUN apt-get update && apt-get install -y curl git build-essential RUN git clone --depth 1 https://github.com/nvim-treesitter/nvim-treesitter /root/.local/share/nvim/site/pack/test/start/nvim-treesitter RUN git clone --depth 1 https://github.com/rikuma-t/nvim-gps /root/.local/share/nvim/site/pack/test/start/nvim-gps RUN nvim --headless -c "TSInstallSync c_sharp" -c "q" RUN {\ echo "func! NvimGps() abort"; \ echo " return luaeval(\"require'nvim-gps'.is_available()\") ? luaeval(\"require'nvim-gps'.get_location()\") : ''"; \ echo "endf"; \ echo "set laststatus=2";\ echo "set statusline+=%{NvimGps()}";\ echo "lua require('nvim-gps').setup()";\ } > /root/init.vim ENTRYPOINT nvim -u /root/init.vim test.cs ```