Commit Graph

32 Commits

Author SHA1 Message Date
3a960023d3 interpreter: new function add_project_dependencies()
This function can be used to add fundamental dependencies such as glib
to all build products in one fell swoop.  This can be useful whenever,
due to a project's coding conventions, it is not really possible to
compile any source file without including the dependency.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-05-03 02:00:29 -04:00
2cdddbab56 Add new debug() function
Adds a new debug() function that can be used in the meson.build to
log messages to the meson-log.txt that will not be printed to stdout
when configuring the project.
2022-03-30 06:57:30 -04:00
cbc62e892a interpreter: add an implementation for structured_sources 2022-03-07 12:33:33 -08:00
4f882ff8ec add install_symlink function
Allows installing symlinks directly from meson, which can
become useful in multiple scenarios. Current main use is to
help moving forward #9557
2021-12-01 13:59:54 -05:00
ace184fa45 syntax-highlighting: vim: whitespace fixes 2021-10-12 11:14:48 -04:00
4d363e463d syntax-highlighting: vim: improve the ftplugin
Add 'formatoptions' to improve comment formatting.

Set b:match_words.  See :help matchit

Set b:browsefilter. See :help browsefilter

Add 'expandtab' from the style guide and a meson_recommended_style
config variable to allow users to disable style-related settings.  This
is a defacto standard feature for ftplugins.
2021-10-12 11:14:48 -04:00
7cddf9a6db syntax-highlighting: vim: set b:undo_ftplugin
See :help undo_ftplugin for details.
2021-10-12 11:14:48 -04:00
462003f996 syntax-highlighting: vim: use Boolean highlight group for booleans 2021-10-12 11:14:48 -04:00
a0dc60f841 syntax-highlighting: vim: match octal and hexadecimal numbers 2021-10-12 11:14:48 -04:00
108bd996ee add install_emptydir function
This replaces the absolute hack of using

```
install_subdir('nonexisting', install_dir: 'share')
```

which requires you to make sure you don't accidentally or deliberately
have a completely different directory with the same name in your source
tree that is full of files you don't want installed. It also avoids
splitting the name in two and listing them in the wrong order.

You can also set the install mode of each directory component by listing
them one at a time in order, and in fact create nested structures at
all.

Fixes #1604
Properly fixes #2904
2021-10-08 14:35:00 -04:00
6512478d2f syntax-highlighting: vim: set b:undo_indent
The b:undo_indent variable gets executed to undo the effects of the
options set earlier in the file.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Liam Beguin <liambeguin@gmail.com>
2021-09-30 00:26:25 +03:00
1dc13e9951 Add unset_variable()
This should be useful for helping to control variable scope within
Meson. CMake has something similar for controlling scope.
2021-08-16 14:05:13 -04:00
d433abf89c syntax-highlighting: vim: add myself as a maintainer
Add myself as a maintainer of these files since I'll be keeping them
in sync with the Vim repository.

Signed-off-by: Liam Beguin <liambeguin@gmail.com>
2021-05-06 15:10:08 +03:00
0fbcebaca1 syntax-highlighting: vim: fix setting cpo
Since 'cpo' is global, use `set` instead of `setlocal`.

See: b66f0372cc11

Signed-off-by: Liam Beguin <liambeguin@gmail.com>
2021-05-06 15:10:08 +03:00
a45f939092 Add range() function
Fixes: #5026.
2021-03-16 20:50:16 -04:00
388fa6e776 vim: Drop backwards compatibility with Vim 5. 2020-11-03 21:06:22 +02:00
84928888e1 vim: Syntax-highlight continue and break statements 2020-07-22 05:06:27 +00:00
a076e9852b syntax-highlighting/vim: Add in as an operator
This was missed. Ages ago.
2020-03-12 13:35:32 -04:00
4e41acb022 Add .wrap file syntax detection for vim
wrap files are ini syntax, and vim has support for this via the `dosini`
syntax type

[skip ci]
2020-01-14 23:17:41 +05:30
6e865a2330 Add a summary() function for configuration summarization
Based on patch from Dylan Baker.

Fixes #757
2019-12-12 18:30:17 -05:00
30acd94e68 syntax-highlighting: vim: fix setting cpo [skip ci]
since 'cpo' is global, use `set` instead of `setlocal`.

Reported-By: Bram Moolenaar <Bram@vim.org>
Signed-off-by: Liam Beguin <liambeguin@gmail.com>
2019-11-07 22:14:29 +02:00
af11f92071 syntax-highlighting: vim: add license header [skip ci]
Add a license header before getting them in the Vim runtime.
2019-10-18 01:24:12 +03:00
18e0029843 syntax-highlighting: vim: set comment string
Vim can automatically comment and format comments. Set the necessary
variable to enable that feature.

See `:help format-comments` for more information.
2019-10-14 08:28:23 -07:00
b21fd95f73 Add is_disabler function
This is useful if one needs to check if a variable is a disabler.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
2019-08-12 01:05:45 +03:00
12d4031f52 Add alias_target() function 2019-07-10 15:01:18 -04:00
80bdc71c0e syntax-highlighting: vim: Allow overriding shiftwidth and softtabstop
The vim syntax indentation rules stored in indent/meson.vim set the
local shiftwidth and softtabstop variables. As the file is loaded last,
after ~/.vim/after/ftplugin/meson.vim (when present), this prevents
overriding the default values for shiftwidth and softtabstop in a local
configuration.

Fix this by setting shiftwidth and softtabstop in ftplugin/meson.vim
instead (as done by the python indentiation rules in upstream vim for
instance) to allow local overrides.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2018-11-30 01:19:10 +02:00
8402a22233 Test that vim syntax highlighting is up-to-date
Needs a `mock` kwarg to Interpreter to not do any parsing of build
files, but only setup the builtins and functions.

Also consolidate the documentation and data tests into one class.
2018-08-07 12:54:56 -07:00
5714ba2534 meson.vim: Add missing disabler() entry [skip ci] 2018-07-02 18:49:34 +05:30
487526bfff Trivial update to meson vim syntax + typo in snippet [skip ci] 2018-04-11 22:07:11 +05:30
70a7cf30a1 Re-link remaining github wiki urls to mesonbuild.com site 2018-02-11 13:39:46 +02:00
54d0faa3dd vim: Add warning function to list of builtins 2017-12-14 23:49:45 +02:00
abbf2f4fab Move shell completions and text editor helpers to data/ 2017-11-11 19:03:22 +03:00