Coder Social home page Coder Social logo

groovy.tmbundle's Introduction

Installation

You can install this bundle in TextMate by opening the preferences and going to the bundles tab. After installation it will be automatically updated for you.

General

License

If not otherwise specified (see below), files in this repository fall under the following license:

Permission to copy, use, modify, sell and distribute this
software is granted. This software is provided "as is" without
express or implied warranty, and with no claim as to its
suitability for any purpose.

An exception is made for files in readable text which contain their own license information, or files where an accompanying file exists (in the same directory) with a “-license” suffix added to the base-name name of the original file, and an extension of txt, html, or similar. For example “tidy” is accompanied by “tidy-license.txt”.

groovy.tmbundle's People

Contributors

aroben avatar infininight avatar jeg2 avatar ldaley avatar sorbits 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

groovy.tmbundle's Issues

Syntax highlighting breaks in a GSP for @page import="" statement.

<%@page import="grails.converters.deep.JSON" %>

<html>
<head>
  <title><g:message code="my.title"/></title>
</head>
<body>
  <div class="monkey"></div>
</body>
</html>

The rest of the page's syntax will break when the <%@page import="grails.converters.deep.JSON" %> is present.

Textmate hangs when inserting text

The Groovy bundle is hanging Textmate every time I do the following:

  1. On a new line, type socketStore.getClient('foo')
  2. Move to beginning of this line and insert def
  3. Textmate hangs. I have to Force Quit.

This is the line I was trying to type. I just entered socketStore.getClient('foo') first and then tried to insert def foo =.

def foo = socketStore.getClient('foo')

Syntax highlighting in groovy code breaks

From @nickoz5 on December 20, 2017 6:9

  • VSCode Version: Code 1.19.0 (816be6780ca8bd0ab80314e11478c48c70d09383, 2017-12-14T12:06:43.492Z)
  • OS Version: Windows_NT x64 10.0.16299
  • Extensions:
Extension Author (truncated) Version
svn-scm joh 1.4.6
Go luk 0.6.70
python ms- 0.9.1
cpptools ms- 0.14.5
PowerShell ms- 1.5.1

Steps to Reproduce:

  1. The following line of code is causing the syntax highlighting to fail for all subsequent lines of code in a groovy script file:

{ it / excludedRegions("/build/.*\r\n/src/${branchPath}release/product/Hotfixes/.*") }

Reproduces without extensions: Yes

Copied from original issue: microsoft/vscode#40551

Syntax highlighting doesn't fully handle slashy strings / dollar slashy strings

There are a couple of problems with syntax highlighting for strings:

  • It doesn't handle interpolations in slashy strings.
  • It doesn't handle dollar slashy strings at all.

So, for example, neither of the following strings will currently highlight properly.

/foo $bar ${baz} boz/
$/foo $bar ${baz} b\o\z/$

And in fact, that Markdown render above has the same issues. As far as I can tell, GH's renderer is also using this TM bundle, via https://github.com/github/linguist/tree/master/vendor/grammars!

Groovy import statement renders with red spaces on GitHub

See this repository for an example.
This shows an import statement with a following callout.
Any space between the end of the import statement is rendered as a red block.
Adding a semicolon at the end of the import statement works around the problem.
The HTML generated by Asciidoctor on my own installation is:

<pre class="highlight"><code class="language-groovy" data-lang="groovy">import x <b class="conum">(1)</b></code></pre>

The HTML generated on GitHub for the line is

<div class="highlight highlight-source-groovy"><pre><span class="pl-k">import</span> <span class="pl-smi">x<span class="pl-ii"> </span>(1)</span></pre></div>

The problem seems to be this:

<span class="pl-ii"> </span>(1)

The pl-ii is a GitHub light CSS style:

.pl-ii /* invalid.illegal */ {
  color: #fafbfc;
  background-color: #b31d28;
}

So the syntax in my example is considered incorrect.
I added some other formatting possibilities to my example as well.
For example, splitting the import across two statements.
These examples show that the problem happens with a trailing comment on an import line.
One of them suggests that splitting an import over two lines is not well handled either.

I guessed that this file was probably used to do the formatting, and some patterns that look like they would match do include some formatting for illegal characters.
But I wasn't able to pin down exactly what was going wrong.

Groovy syntax highlighting and quoted method names

Hi there, when using Groovy and quoted method names, it looks like two or more words at the beginning, followed by parenthesis breaks the syntax highlighting:

def "Those () or () () and neither (x) breaks a quoted method name"() {
  expect: true
}

def "Word and () however breaks a quoted method name"() {
  expect: true
}

CPU Spike on lion

Opening this example groovy file in textmate will cause CPU to spike to 100%

class Test {
def xxx(){
mc.getEr = {->
}
}
}

Death Recursion

The problem seems to come from writing certain types of groovy syntax in a java style method definition in a groovy file.
The example i've included below goes through a specific case where this crashes textmate in more detail

Cheers, i hope this helps sort this problem out soon!

  • Sina

=== Example where this breaks ===

class works implements Runnable{
def run(){
someThing.someFun()
// as i add 'def a = ' this does NOT crash textmate
def a = someThing.someFun()
}
}

class crashes implements Runnable{
public void run(){
someThing.someFun()
// if you try to add 'def a = ' to the following line this CRASHES textmate
// We note that the "def" does not get highlighted in yellow, then when you press space
// crash
// My Version of textmate is: Version 1.5.9 (1589)
// My version of the groovy plugin is the head from http://github.com/alkemist/Groovy-Grails.tmbundle
someThing.someFun()
}
}

Double quotes strange behaviour

Editing tags like that

<g:datePicker name="createdAt" precision="day" readeOnly="true" value="${registrationInstance?.createdAt}" />

in a .gsp page, when I press " (double quotes) i`m getting ${} instead of "".

Groovy syntax highlighting falsely finds a method invocation in a string method name

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.70.2, 1.71.0
  • OS Version: macOS

Steps to Reproduce:

  1. Open a new tab with Groovy language
  2. Type or paste below code
def 'foo(bar)'() {
    println 'correct syntax highlight'
}

def 'foo (bar)'() {
    println 'correct syntax highlight'
}

def 'f oo(bar)'() {
    println 'incorrect syntax highlight'
}

def ' foo(bar)'() {
    println 'incorrect syntax highlight'
}

vscode-groovy-syntax

Originally from @dawidsawa in microsoft/vscode#159928

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.