339 Commits

Author SHA1 Message Date
Colomban Wendling
94aa892c81 Merge pull request #373 from techee/go_ctags
Add a Go ctags parser.
2014-11-30 02:03:00 +01:00
Jiří Techet
ccb15a31be Add the go ctags parser
Make go one of the builtin filetypes, add the parser and update the related
source and config files. While there, remove Rust from [Groups] in
filetype_extensions.conf because it's already a builtin filetype as well.

The parser itself is stolen from the fishman/ctags repo.
2014-11-30 01:35:00 +01:00
Colomban Wendling
4074843b42 coffeescript: Recognize string and comment styles 2014-11-26 19:52:20 +01:00
Mark Dresselhaus
07002d252a Add coffescript syntax highlighting
imported lexer from Scintilla and added coffeescript filetype
2014-11-26 19:52:20 +01:00
Jiří Techet
bdee1336aa Keep a separate list of typenames for Scintilla syntax highlighting
Manage the list the same way as workspace tags_array by the fast tag removal
and merge. Thanks to this, typename tags don't have to be extracted from
tags_array periodically, which speeds up editing.
2014-10-30 22:08:17 +01:00
Colomban Wendling
521778ad31 Color scheme dialog: scroll to the initially selected item 2014-08-12 20:40:21 +02:00
Colomban Wendling
df964312b2 Remove a global in colorscheme dialog code 2014-08-12 20:38:59 +02:00
Colomban Wendling
74ef1b8344 Update for new Scintilla styles 2014-08-10 02:21:54 +02:00
Matthew Brush
4efcbab332 Include what you use
This is a mega-commit - because most of it had to be done in one go
otherwise some commits would fail to compile - that attempts to fix a
few problems with Geany's includes as well as various other related
cleanups. After this change it's easier to use includes and there's
little worry about which order things are included in or who includes
what.

Overview of changes:

* Include config.h at the start of each source file if HAVE_CONFIG_H
  is defined (and never in headers).
* Go through each source file and make the includes section generally
  like this:
  - Always config.h first as above
  - Then if the file has a header with the same name, include that
  - Then include in alphabetical order each other internal/geany header.
  - Then include standard headers
  - Then include non-standard system headers
  - Then include GLib/GTK+ related stuff
* Doing as above makes it easier to find implicit header include
  dependencies and it exposed quite a few weird problems with includes
  or forward declarations, fix those.
* Make geany.h contain not much besides some defines.
  - Add a little header file "app.h" for GeanyApp and move it there
  - Move "app" global to new "app.h" file
  - Move "ignore_callback" global to "callbacks.h"
  - Move "geany_object" global to "geanyobject.h"
* Add an include in "geany.h" for "app.h" since GeanyApp used to be
  defined there and some plugins included this header to access
  GeanyApp.
* Include "gtkcompat.h" everywhere instead of gtk/gtk.h so that
  everywhere sees the same definitions (not a problem in practice AFAIK
  so this could be changed back if better that way.
* Remove forward declarations from previous commits as some people
  apparently consider this bad style, despite that it reduces inter-
  header dependencies.

TODO:
* As always, to test on win32
* As always, to test with not Autotools
* Test plugins better, both builtin and geany-plugins, likely API/ABI bump
* Test with various defines/flags that may change what is included
* win32.[ch] not really touched since I couldn't test
2014-05-21 15:37:19 -07:00
Colomban Wendling
67329f2b98 Update for new Scintilla styles
The new C styles escapesequence and taskmarker are currently mapped
conservatively, and may benefit from a more visible mapping.
2014-05-17 22:17:44 +02:00
Colomban Wendling
9a41f919c1 Update mappings for new Scintilla 2014-04-14 16:36:05 +02:00
SiegeLord
3d7ade4e02 Integrate the Rust lexer with the rest of Geany's functionality 2014-01-14 12:50:38 -05:00
Colomban Wendling
69f1cc7136 Remove useless rotate_rgb() 2013-12-04 15:49:47 +01:00
Colomban Wendling
4ce6409e89 Remove useless utils_invert_color() 2013-12-04 15:46:05 +01:00
Colomban Wendling
8980970630 Unify color parsing
Change utils_parse_color() to use gdk_color_parse() and follow its
syntax, additionally supporting our "0x" prefix as a synonym for the
"#" prefix;  and use this everywhere.

Also add utils_color_to_bgr() and utils_parse_color_to_bgr() to provide
conversion to the 24 bits BGR format used by Scintilla.
2013-12-04 15:31:17 +01:00
Colomban Wendling
3759562d7c Simplify reading highlighting colors with new utils_parse_color()
Drop redundant code converting # and short formats to hex colors now
utils_parse_color() can parse them.
2013-12-02 22:58:54 +01:00
Colomban Wendling
507005ca54 Rename utils_strtod() to utils_parse_color()
Rename the function to a more sensible name, and remove unnecessary
arguments.  Now, format (# or 0x) is auto-detected.
2013-12-02 22:38:11 +01:00
Colomban Wendling
1f2279aefe Always use proper functions argument lists 2013-11-10 01:43:10 +01:00
Igor Shaula
df589a9d52 Add PowerShell filetype
Windows PowerShell is a command-line shell and associated scripting language
which comes out of the box with Windows 7/Server 2008/8/Server 2012.

Original lexer from Scintilla is used.
2013-08-15 19:44:33 -07:00
exbb2
09e7d8398f Haskell filetype improvements and support for Literal Haskell
Closes #155 and also closes #139
2013-08-14 23:16:39 -07:00
canou
b518770dea Add support for DOS, OS/2 and Windows batch files
* Uses existing LexOthers.cxx from Scintilla already in use by Geany
* "identifier" style mapping goes to "string" for better presentation
even if it's semantically incorrect, we'll change it back if it causes
issues for anyone.
* Filetype configuration and keywords taken from Don Ho's Notepad++.

Closes #160
2013-08-14 23:04:35 -07:00
Nick Treleaven
0998f1c19c Make code more readable by renaming poorly named macros NZV and NVL
Closes #159
2013-08-14 21:54:20 -07:00
Colomban Wendling
4bac3717ea Update for new Scintilla styles 2013-05-22 03:38:21 +02:00
Colomban Wendling
564ef98f9c Update for new Scintilla styles 2013-04-27 18:30:17 +02:00
Colomban Wendling
776c77d6b6 Use GLib version of C99's snprintf() 2013-04-22 20:18:18 +02:00
Baptiste Pierrat
d4e61bf093 Add support for Abaqus files
Support for Abaqus (.inp) files, including scintilla lexer and tag
parser.

Signed-off-by: Baptiste Pierrat <baptiste.pierrat@gmail.com>
2013-02-12 14:56:38 +01:00
Colomban Wendling
4ffd446c43 Update for new PO styles 2012-10-25 17:09:55 +02:00
Colomban Wendling
3070738df8 Make wordchars have precedence over whitespacechars
This makes the "wordchars" setting from filetypes.common and each
specific filetype override filetype.common's "whitespace_chars"
setting, rather than it overriding filetype-specific "wordchars".

This makes the it easy to chose filetype-specific "wordchars", where
before user had not only to update this setting, but also the
filetype.common "whitespace_chars" setting if it listed one or more of
the new characters for the change to actually have an effect -- and
changing "whitespace_chars" for every filetype.

Closes #3429368.
2012-10-06 01:32:54 +02:00
Colomban Wendling
c1a7b1b475 Fix various packing issue affecting GTK3 but compatible with GTK2 2012-09-28 18:06:58 +02:00
Lex Trotman
e5e3760157 Use faster squiggle underlining
Geany performance suffered with a lot of error underlining visible.
Matthew Brush developed an improved implementation that was accepted
into Scintilla, this selects that implementation.
2012-09-22 12:47:29 +10:00
Colomban Wendling
d80bc7ce56 Update FSF address
Closes #3557875.
2012-08-24 19:25:57 +02:00
Colomban Wendling
4cdcaa22e6 Update for new Scintilla styles 2012-07-14 15:30:03 +02:00
Colomban Wendling
298ce94c5d Update for new Scintilla styles 2012-06-26 23:26:30 +02:00
Colomban Wendling
1c2c455b1d Update copyright information 2012-06-18 01:15:04 +02:00
Nick Treleaven
edeaa521a2 Show info message if selection style is invisible, not warning 2012-06-08 13:28:07 +01:00
Nick Treleaven
7b3b65e27d Add workaround for users with an invisible selection style
This is likely to be the case for any users that copied the system
selection style line as this was incorrectly set before, but not
applied.
2012-06-03 18:04:03 +01:00
Nick Treleaven
dd87e318cf Fix applying default selection colors after editing 'selection' style
Default colors were not restored when disabling the override flags.
2012-06-03 17:38:30 +01:00
Nick Treleaven
563249f7c6 Warn user if current filetype might not support color schemes
If the 'default' style isn't set to a named style, then probably the
filetype styles have been overridden with manual colors and may not
work properly with color schemes.

Note: HTML-based filetypes won't show a warning because they don't
have a 'default' style (they use 'html_default' instead).

This is a simple heuristic, but is worth having to avoid some
spurious bug reports when using the color schemes dialog.
2012-05-29 18:05:56 +01:00
Colomban Wendling
2ed1d6d8bb Do not apply color scheme upon color scheme selection dialog display
Current color scheme was applied upon color scheme selection dialog
display because the GtkTreeView::cursor-changed signal is emitted when
the tree view is initially shown (since it actually gets the focus for
the first time), uselessly re-applying the current color scheme.

This is a performance issue because when many documents are open
updating the color scheme can take a few seconds.

Now we watch for the GtkTreeSelection::changed signal on the tree
view's selection, which is only emitted when the selected item actually
changes.  We also connect to that signal after filling the tree so we
don't get notified on the initial selection setup.
2012-05-27 20:25:19 +02:00
Colomban Wendling
e87f393192 Create color scheme menu item with Glade
Now there is a dialog instead of a menu for selecting the color
schemes, the item under View->Editor can be created with Glade like the
rest of the menu.
2012-05-27 01:14:25 +02:00
Nick Treleaven
9ddeed5254 Enable entity completion for XML documents 2012-04-13 17:41:52 +01:00
Nick Treleaven
6badca5201 Destroy color scheme dialog after closing instead of just hiding it 2012-03-15 16:12:32 +00:00
Matthew Brush
4e42814ead Automatically show color scheme dialog scrollbars, set shadow type 2012-03-15 15:54:41 +00:00
Nick Treleaven
dcc079d814 Replace Color Schemes menu with custom dialog
A dialog makes it easier to select different items when comparing
themes, and easier to see the descriptions.
2012-03-14 16:56:55 +00:00
Matthew Brush
589ffff377 Add Scintilla wrapper function sci_set_lexer()
When the lexer is changed it clears all styling information and resets
the folding state.

Closes #3486917 and #3486918
2012-02-12 22:35:08 -08:00
Nick Treleaven
9426104f0b Remove utils_build_path() - use g_build_filename instead 2012-02-06 16:41:18 +00:00
Matthew Brush
9ff4eec853 Fix Color Schemes menu items activation when used with libdbusmenu.
I'm not even going to try to explain why this fixes it :)
2012-01-30 21:32:16 -08:00
Nick Treleaven
b287553e4a Use 'SETPTR' instead of 'setptr'
This makes it clearer we're using a macro.
2012-01-25 16:26:16 +00:00
Nick Treleaven
89a0a954e0 Remove unused parameter ft_id 2011-12-26 12:56:30 +00:00
Matthew Brush
b347b4a611 Improve handling of named styles and named colors 2011-12-26 00:37:16 -08:00