summary refs log tree commit diff
path: root/src/etc/vim
AgeCommit message (Collapse)AuthorLines
2014-09-30auto merge of #17479 : gamazeps/rust/issue17478, r=alexcrichtonbors-1/+1
closes #17478
2014-09-29Replaced some TODO by FIXMEgamazeps-1/+1
closes #17478
2014-09-22Add cargo.vim compiler file.Damien Radtke-0/+49
2014-09-18fix for vim < 7.4.355Julian Orth-0/+37
2014-09-13update vim indent fileJulian Orth-38/+3
2014-08-17auto merge of #16547 : huonw/rust/new-kw, r=pcwaltonbors-1/+1
2014-08-17auto merge of #16535 : michaelsproul/rust/vim-traits, r=pcwaltonbors-8/+8
The vim syntax highlighting file had become out of sync with the real prelude. Lots of Vector -> Slice renames have happened recently.
2014-08-17Add new keywords (particularly `where` & `virtual`) to editor modes.Huon Wilson-1/+1
2014-08-16vim: Update syntax file for Prelude changes.Michael Sproul-8/+8
Lots of Vector -> Slice renames.
2014-08-15vim: Don't set foldmethod in the syntax file eitherKevin Ballard-11/+14
We shouldn't be setting any settings in the syntax file. Better to put them in the ftplugin, where they won't be pulled in by :syn-include and can be cleaned up when changing the filetype.
2014-08-13vim: Stop setting conceallevel in the syntax fileKevin Ballard-2/+9
We shouldn't be setting conceallevel in the syntax file. Besides not being able to undo this if we switch to another syntax later, it also interferes with embedding rust in other filetypes (such as markdown). Instead, set it in the ftplugin, where it belongs.
2014-08-07Rename `Share` to `Sync`Alex Crichton-1/+1
This leaves the `Share` trait at `std::kinds` via a `#[deprecated]` `pub use` statement, but the `NoShare` struct is no longer part of `std::kinds::marker` due to #12660 (the build cannot bootstrap otherwise). All code referencing the `Share` trait should now reference the `Sync` trait, and all code referencing the `NoShare` type should now reference the `NoSync` type. The functionality and meaning of this trait have not changed, only the naming. Closes #16281 [breaking-change]
2014-07-23vim: Add MutableSeqBrian Anderson-1/+1
2014-07-21Fix :syn-include usage of Vim filetype.Chris Morgan-3/+5
Here’s what the Vim manual says in *:syn-include*: :sy[ntax] include [@{grouplist-name}] {file-name} All syntax items declared in the included file will have the "contained" flag added. In addition, if a group list is specified, all top-level syntax items in the included file will be added to that list. We had two rules for `rustModPath`, one `contained` and the other not. The effect was that the second (now renamed to `rustModPathInUse`) was being included in the group list, and thus that all identifiers were being highlighted as `Include`, which is definitely not what we wanted.
2014-07-21Highlight $(…)* and $foo in Vim.Chris Morgan-0/+7
2014-07-16auto merge of #15476 : kballard/rust/more_vim_tweaks, r=chrisbors-7/+31
Tweak the text editing settings (softtabstop, textwidth, etc). Add some settings to turn on folding and colorcolumn. Add the undo_ftplugin changes that my previous patch forgot.
2014-07-08std: Rename the `ToStr` trait to `ToString`, and `to_str` to `to_string`.Richo Healey-1/+1
[breaking-change]
2014-07-07Remove rust_colorcolumn, set textwidth to 99Kevin Ballard-27/+2
The latest change to aturon/rust-guidelines states that lines must not exceed 99 characters. This gets rid of the 80/100 split, so we don't need to customize colorcolumn amymore.
2014-07-07Set softtabstop, textwidth, and optionally colorcolumnKevin Ballard-4/+32
Setting softtabstop makes <Del> delete 4 spaces as if it were a tab. Setting textwidth allows comments to be wrapped automatically. It's set at 80, which is the recommended line length for Rust programs. There are suggestions that it should be 79, but our current style guide says 80 so that's what we're matching. A new setting g:rust_colorcolumn sets colorcolumn as well, to +1,101. This indicates both the textwidth and the second stricter line length of 100 that our style guide lists.
2014-07-07Define a new setting g:rust_foldKevin Ballard-3/+24
g:rust_fold allows folding to be enabled. This lets the user turn on folding without having to define autocommands.
2014-07-07librustc (RFC #34): Implement the new `Index` and `IndexMut` traits.Patrick Walton-1/+1
This will break code that used the old `Index` trait. Change this code to use the new `Index` traits. For reference, here are their signatures: pub trait Index<Index,Result> { fn index<'a>(&'a self, index: &Index) -> &'a Result; } pub trait IndexMut<Index,Result> { fn index_mut<'a>(&'a mut self, index: &Index) -> &'a mut Result; } Closes #6515. [breaking-change]
2014-07-04vim: set Rust tab conventionsKevin Ballard-0/+6
2014-07-01Vim syntax file types and traits cleanupAlexandre Gagnon-15/+20
2014-06-24auto merge of #14952 : alexcrichton/rust/const-unsafe-pointers, r=brsonbors-2/+1
This does not yet change the compiler and libraries from `*T` to `*const T` as it will require a snapshot to do so. cc #7362 --- Note that the corresponding RFC, https://github.com/rust-lang/rfcs/pull/68, has not yet been accepted. It was [discussed at the last meeting](https://github.com/rust-lang/rust/wiki/Meeting-weekly-2014-06-10#rfc-pr-68-unsafe-pointers-rename-t-to-const-t) and decided to be accepted, however. I figured I'd get started on the preliminary work for the RFC that will be required regardless.
2014-06-22Update few files after comparison traits renamingPiotr Jawniak-2/+2
There were still Total{Ord,Eq} in docs and src/etc
2014-06-18Vim: highlight invalid characters in char literals.Chris Morgan-2/+7
2014-06-18Vim: highlight escapes for byte literals.Chris Morgan-7/+11
2014-06-18Add commands :RustEmitIr and :RustEmitAsmKevin Ballard-0/+62
2014-06-18Write documentation for the Rust vim pluginKevin Ballard-25/+131
2014-06-18Rename :Run and :Expand to :RustRun and :RustExpandKevin Ballard-17/+17
2014-06-18vim: Add :Run and :Expand commandsKevin Ballard-37/+265
Define a command :Run to compile and run the current file. This supports unnamed buffers (by writing to a temporary file). See the comment above the command definition for notes on usage. Define <D-r> and <D-R> mappings for :Run to make it easier to invoke in MacVim. Define a command :Expand to display the --pretty expanded output for the current file. This can be configured to use different pretty types. See the comment above the command definition for notes on usage. Create an autoload file and put function definitions there to speed up load time.
2014-06-16Add a Syntastic plugin for Rust.Andrew Gallant-0/+57
2014-06-16rustc: Start accepting `*const T`Alex Crichton-2/+1
This does not yet change the compiler and libraries from `*T` to `*const T` as it will require a snapshot to do so. cc #7362
2014-05-24core: rename strbuf::StrBuf to string::StringRicho Healey-1/+1
[breaking-change]
2014-05-20vim: Handle box expressions speciallyKevin Ballard-7/+20
Attempt to highlight the placement expression in a `box (expr) foo` expression. Also treat GC as a keyword within the placement expression. This doesn't work correctly for arbitrary expressions. Notably, this makes no attempt at balancing delimiters. I believe handling that will require rewriting the syntax rules to add a region for every pair of delimiters. That may be a desirable thing to do in the end, because we can then rewrite our indent rules based on the syntax and get rid of cindent(), but for the time being, we'll just live with the limitation.
2014-05-20Update rust.vim for the latest prelude/keywordsKevin Ballard-18/+23
2014-05-08vim: Fix an indentation issue with cindentKevin Ballard-11/+16
cindent handles the following case incorrectly: impl X { b: int, // c: int, } if you try and insert a new line after the `c` declaration. To fix this, fix the get_line_trimmed() function to work properly, and then extend GetRustIndent to keep searching backwards until it finds a non-blank line after trimming. This lets it handle the trailing comma case properly, as if the comment were never there. Fixes #14041.
2014-05-06etc: Add box as a keyword to editor configsAlex Crichton-1/+1
This keyword is about to be used much more often than it was a few weeks ago, it's time to tell editors about the new keyword.
2014-05-04vim: Fix indentation at global scope after non-semantic ([{/)]}Kevin Ballard-3/+19
If an unbalanced [ exists in a string or comment, this should not be considered when calculating the indent at the top level. Similarly, when testing for ({/}) to see if we're at the top level to begin with, strings and comments should be skipped.
2014-04-24Fix Vim indent regressions from #13600.Chris Morgan-1/+1
The change in #13600 was incorrect, containing a bad regular expression; inside an indent function, errors are silently ignored (and the ``~=`` operation will return 0), so it just always failed, causing the cases that were supposed to be caught to not be caught and making things like the ``match`` example shown above or struct field definitions regress. I have fixed the regular expression to what it should have been. This is still imperfect, of course, not handling cases like where the first argument to a function is a function call (``foo(bar(),``), but it'll do for now.
2014-04-19auto merge of #13609 : richo/rust/str-type-vim, r=alexcrichtonbors-1/+1
It seems really weird to me when StrSlice and str highlight sanely, but StrBuf doesn't. I think I added it to the right place.
2014-04-18vim: Add StrBuf as type to hilightingRicho Healey-1/+1
2014-04-18Add another case where cindent is correctBrandon Waskiewicz-0/+11
When calling a function, or anything with nested parens, default to cindent's indent. The least error-prone way I could think of identifying this is to look for a line that ends with a ',', as well as a non-zero number of any character except parens before the comma, and then an open paren. This will overlap with the previous rule accounting for function definitions, but that should be fine because it is also using cindent.
2014-03-30Support new attribute syntax in vim syntax fileSteven Fackler-1/+1
2014-03-28Remove `Freeze` and add `Share` in vim's syntaxFlavio Percoco-1/+1
2014-03-28Rename Pod into CopyFlavio Percoco-1/+1
Summary: So far, we've used the term POD "Plain Old Data" to refer to types that can be safely copied. However, this term is not consistent with the other built-in bounds that use verbs instead. This patch renames the Pod kind into Copy. RFC: 0003-opt-in-builtin-traits Test Plan: make check Reviewers: cmr Differential Revision: http://phabricator.octayn.net/D3
2014-03-20rm obsolete references to `DeepClone`Daniel Micay-1/+1
2014-03-13std: Rename Chan/Port types and constructorAlex Crichton-1/+1
* Chan<T> => Sender<T> * Port<T> => Receiver<T> * Chan::new() => channel() * constructor returns (Sender, Receiver) instead of (Receiver, Sender) * local variables named `port` renamed to `rx` * local variables named `chan` renamed to `tx` Closes #11765
2014-03-01Merge pull request #12308 from kballard/vim-nested-commentsbors-5/+6
vim: Tweak how comment nesting works Reviewed-by: brson
2014-02-27Update Vim syntax file last change date.Chris Morgan-1/+1