Writing a syntax highlighter

Syntax highlighters can work in two very general ways. The first implements a full lexer and parser for the language(s) being highlighted, exactly identifying each token’s type (keyword, class name, instance name, variable type, preprocessor directive…). This provides all the information needed to exactly highlight the code according to some specification (keywords in red, class … Read more

How can I get VS’s python syntax highlighting in VS code?

I ran into the same issue and some VS Code themes are not supporting syntax highlighting atleast for me. I tried with Ruby and Python and the theme I was using was Dark(Visual Studio). Changing to Dark+ (Default Dark) did the trick for me. Goto Preferences -> Color Themes and choose Dark+(Default Dark) or something … Read more

vim randomly breaks syntax highlighting

I have had this behaviour occasionally, but I’ve always just let it be, as its only affected me while editing very large files. However, now you’ve brought it up I went looking for a solution. I found this page: http://vim.wikia.com/wiki/Fix_syntax_highlighting, which has the following command: :syntax sync fromstart Running that solves it for me, although … Read more

Nano syntax highlighting in Mac OS X 10.7 (Lion)?

On Mac, Homebrew (brew) will allow you to easily upgrade nano to a newer version than the one that came with Mac OSX. Install brew, then install a new version of nano from the Terminal. brew install nano Installing this way includes the /usr/local/share/nano folder containing the default syntax highlight files. See also the extra … Read more

How to make IntelliJ IDEA recognise code created by macros?

With the latest Scala plugin build, there is an API which can be used to write your own plugin to support your macros: http://blog.jetbrains.com/scala/2015/10/14/intellij-api-to-build-scala-macros-support/ Now, everyone can use this API to make their macros more friendly to their favorite IDE. To do that, you have to implement SyntheticMembersInjector, and register it in the plugin.xml file: … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)