syntax-highlighting

How to make IntelliJ IDEA recognise code created by macros?

孤者浪人 提交于 2019-12-22 05:35:24
问题 Background I have an sbt-managed Scala project that uses the usual sbt project layout for Scala projects with macros, i.e., a subproject that contains the macros a main project that is the actual application and that depends on the macro subproject. The macros are macro annotations which, in essence, generate companion objects for regular classes. The generated companion objects declare, amongst other members, apply/unapply methods. I used the sbt-idea plugin to generate a corresponding

Syntax highlighting rules and definitions

橙三吉。 提交于 2019-12-22 03:41:29
问题 Are there any standard syntax highlighting rules for R? If yes, where can they be found? Or does each editor, IDE, package (e.g., the highlight package) create their own rule set? 回答1: Each editor creates their own rule set. For historical reasons, each editor has implemented syntax highlighting in its own way. Having a cross-editor standard may be possible using, for example, GeSHi, but it would almost certainly require a lot of effort getting editor makers to sign up to it, especially if

Converting Emacs/vim highlighting to TextMate (for SublimeText)

北城以北 提交于 2019-12-21 21:44:12
问题 I have syntax highlighting files for Pyret in vim (.vim) and emacs (.el) and would like to use them in Sublime Text (3). According to this answer and other research, Sublime Text style themes are written in TextMate format. There exists a tool to help convert from TextMate to Emacs, but I contacted the author and he isn't aware of any tools to help facilitate the opposite conversion. A similar question was asked (re: vim) but not answered a year ago: .vim syntax highlighting to textmate or

Define a syntax region which depends on the indentation level

99封情书 提交于 2019-12-21 19:58:14
问题 I'm trying to built a lighter syntax file for reStructuredText in Vim. In rst, literal blocks start when "::" is encountered at the end of a line: I'll show you some code:: if foo = bar then do_something() end Literal blocks end when indentation level is lowered. But, literal blocks can be inside other structures that are indented but not literal: .. important:: Some code for you inside this ".. important" directive:: Code comes here Back to normal text, but it is indented with respect to "..

What does the three slashes in javascript do?

…衆ロ難τιáo~ 提交于 2019-12-21 19:53:11
问题 I'm still new to Javascript so when my editor highlights it I'm intrigued. what exactly does it do? Example: /// things go after here 回答1: Some documentation generators regard three slashes /// as introducing documentation comments to JavaScript. See http://msdn.microsoft.com/en-us/library/bb514138(v=vs.110).aspx So three slashes work the same as two slashes as far as JavaScript is concerned (it's a comment-to-end-of-line), but three slashes can be interpreted by documentation generators to

Keyword highlighting on selection in Visual Studio 2008

隐身守侯 提交于 2019-12-21 19:27:21
问题 A little while ago I managed to get Visual Studio 2008 (C++) into a state where, if I would select a keyword (or any symbol for that matter), by either double clicking on it or highlighting it, all other instances of that symbol within the current file would become highlighted too. This was a really useful feature. Since then it's gone away, and I don't know how to get it back. Please help. @Sander - that'll be it. Thanks! 回答1: I think you've installed RockScroll. It also lights them up in

How to turn off errors/warnings in Eclipse due to OpenCL/CUDA syntax?

时光总嘲笑我的痴心妄想 提交于 2019-12-21 19:24:23
问题 I am using Eclipse as an editor for OpenCL and I turned on syntax highlighting for *.cl files to behave like C++ code. It works great, but all my code is underlined as syntax errors. Is there a way that I can have my syntax highlighting and turn off the errors/warnings just for my *.cl files? 回答1: First, the Eclipse syntax highlighter is programmed to the grammar of C and C++, and not OpenCL, so it is unaware of the syntactic extensions of OpenCL, such as New keywords New data types I suggest

Java API for source formatting

白昼怎懂夜的黑 提交于 2019-12-21 18:36:10
问题 There are several PHP or js code formatting libs out there -- does anyone know if similar libs exist in Java? Ie., Given a string of code, return a formatted string with syntax colouring etc. It'd be ideal if it auto detected the language, but I might be pushing my luck there... The text will ultimately be displayed within a Flex application, so while I could use a js lib, we'll be parsing large files (up to 6000 lines), so I'd like to keep client side processing minimal. Ideal output is HTML

VSCode configure syntax highlighting to match a style guide

元气小坏坏 提交于 2019-12-21 17:50:55
问题 How do I change the syntax highlighting in VSCode so that it adheres to a particular style guide? For example, I want to adhere to the Google C++ style guide where member variables are written as some_member_variable_ . When I use this convention, VSCode does not color that name differently from standard text. But I have some code that uses the mSomeMemberVariable convention, and that does get colored differently than other text. Is there a way to configure this better? 回答1: TL;DR >There is

Eclipse CDT: Disable red underlining

风格不统一 提交于 2019-12-21 17:17:17
问题 I use eclipse cdt and I included some files. Unfortunalty I cannot add the include path to my eclipse project since then eclipse will always crash when it starts indexing the newly added includes. Therefore I would like to turn off the feature that highlights errors. Where can I do this? 回答1: This is probably not the answer to your problem, but it's actually the answer to your question (which I was looking for and now found out myself): How to disable the red underlining, which can be pretty