mirror of
https://github.com/latex-lsp/texlab.git
synced 2025-12-23 09:19:21 +00:00
Run "cargo fmt" (#1479)
This commit is contained in:
parent
245070ff91
commit
829e80d7b3
87 changed files with 228 additions and 148 deletions
|
|
@ -59,122 +59,170 @@ pub static BIBTEX_ENTRY_TYPES: &[BibtexEntryType<'static>] = &[
|
|||
BibtexEntryType {
|
||||
name: "@article",
|
||||
category: BibtexEntryTypeCategory::Article,
|
||||
documentation: Some("An article in a journal, magazine, newspaper, or other periodical which forms a \n self-contained unit with its own title. The title of the periodical is given in the \n journaltitle field. If the issue has its own title in addition to the main title of \n the periodical, it goes in the issuetitle field. Note that editor and related \n fields refer to the journal while translator and related fields refer to the article.\n\nRequired fields: `author`, `title`, `journaltitle`, `year/date`"),
|
||||
documentation: Some(
|
||||
"An article in a journal, magazine, newspaper, or other periodical which forms a \n self-contained unit with its own title. The title of the periodical is given in the \n journaltitle field. If the issue has its own title in addition to the main title of \n the periodical, it goes in the issuetitle field. Note that editor and related \n fields refer to the journal while translator and related fields refer to the article.\n\nRequired fields: `author`, `title`, `journaltitle`, `year/date`",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@book",
|
||||
category: BibtexEntryTypeCategory::Book,
|
||||
documentation: Some("A single-volume book with one or more authors where the authors share credit for\n the work as a whole. This entry type also covers the function of the `@inbook` type\n of traditional BibTeX.\n\nRequired fields: `author`, `title`, `year/date`"),
|
||||
documentation: Some(
|
||||
"A single-volume book with one or more authors where the authors share credit for\n the work as a whole. This entry type also covers the function of the `@inbook` type\n of traditional BibTeX.\n\nRequired fields: `author`, `title`, `year/date`",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@mvbook",
|
||||
category: BibtexEntryTypeCategory::Book,
|
||||
documentation: Some("A multi-volume `@book`. For backwards compatibility, multi-volume books are also\n supported by the entry type `@book`. However, it is advisable to make use of the\n dedicated entry type `@mvbook`.\n\nRequired fields: `author`, `title`, `year/date`"),
|
||||
documentation: Some(
|
||||
"A multi-volume `@book`. For backwards compatibility, multi-volume books are also\n supported by the entry type `@book`. However, it is advisable to make use of the\n dedicated entry type `@mvbook`.\n\nRequired fields: `author`, `title`, `year/date`",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@inbook",
|
||||
category: BibtexEntryTypeCategory::Part,
|
||||
documentation: Some("A part of a book which forms a self-contained unit with its own title. Note that the\n profile of this entry type is different from standard BibTeX.\n\nRequired fields: `author`, `title`, `booktitle`, `year/date`"),
|
||||
documentation: Some(
|
||||
"A part of a book which forms a self-contained unit with its own title. Note that the\n profile of this entry type is different from standard BibTeX.\n\nRequired fields: `author`, `title`, `booktitle`, `year/date`",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@bookinbook",
|
||||
category: BibtexEntryTypeCategory::Part,
|
||||
documentation: Some("This type is similar to `@inbook` but intended for works originally published as a\n stand-alone book. A typical example are books reprinted in the collected works of\n an author."),
|
||||
documentation: Some(
|
||||
"This type is similar to `@inbook` but intended for works originally published as a\n stand-alone book. A typical example are books reprinted in the collected works of\n an author.",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@suppbook",
|
||||
category: BibtexEntryTypeCategory::Book,
|
||||
documentation: Some("Supplemental material in a `@book`. This type is closely related to the `@inbook`\n entry type. While `@inbook` is primarily intended for a part of a book with its own\n title (e. g., a single essay in a collection of essays by the same author), this type is\n provided for elements such as prefaces, introductions, forewords, afterwords, etc.\n which often have a generic title only. Style guides may require such items to be\n formatted differently from other `@inbook` items. The standard styles will treat this\n entry type as an alias for `@inbook`."),
|
||||
documentation: Some(
|
||||
"Supplemental material in a `@book`. This type is closely related to the `@inbook`\n entry type. While `@inbook` is primarily intended for a part of a book with its own\n title (e. g., a single essay in a collection of essays by the same author), this type is\n provided for elements such as prefaces, introductions, forewords, afterwords, etc.\n which often have a generic title only. Style guides may require such items to be\n formatted differently from other `@inbook` items. The standard styles will treat this\n entry type as an alias for `@inbook`.",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@booklet",
|
||||
category: BibtexEntryTypeCategory::Book,
|
||||
documentation: Some("A book-like work without a formal publisher or sponsoring institution. Use the field\n howpublished to supply publishing information in free format, if applicable. The\n field type may be useful as well.\n\nRequired fields: `author/editor`, `title`, `year/date`"),
|
||||
documentation: Some(
|
||||
"A book-like work without a formal publisher or sponsoring institution. Use the field\n howpublished to supply publishing information in free format, if applicable. The\n field type may be useful as well.\n\nRequired fields: `author/editor`, `title`, `year/date`",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@collection",
|
||||
category: BibtexEntryTypeCategory::Collection,
|
||||
documentation: Some("A single-volume collection with multiple, self-contained contributions by distinct\n authors which have their own title. The work as a whole has no overall author but it\n will usually have an editor.\n\nRequired fields: `editor`, `title`, `year/date`"),
|
||||
documentation: Some(
|
||||
"A single-volume collection with multiple, self-contained contributions by distinct\n authors which have their own title. The work as a whole has no overall author but it\n will usually have an editor.\n\nRequired fields: `editor`, `title`, `year/date`",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@mvcollection",
|
||||
category: BibtexEntryTypeCategory::Collection,
|
||||
documentation: Some("A multi-volume `@collection`. For backwards compatibility, multi-volume collections\n are also supported by the entry type `@collection`. However, it is advisable\n to make use of the dedicated entry type `@mvcollection`.\n\nRequired fields: `editor`, `title`, `year/date`"),
|
||||
documentation: Some(
|
||||
"A multi-volume `@collection`. For backwards compatibility, multi-volume collections\n are also supported by the entry type `@collection`. However, it is advisable\n to make use of the dedicated entry type `@mvcollection`.\n\nRequired fields: `editor`, `title`, `year/date`",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@incollection",
|
||||
category: BibtexEntryTypeCategory::Part,
|
||||
documentation: Some("A contribution to a collection which forms a self-contained unit with a distinct author\n and title. The `author` refers to the `title`, the `editor` to the `booktitle`, i. e.,\n the title of the collection.\n\nRequired fields: `author`, `title`, `booktitle`, `year/date`"),
|
||||
documentation: Some(
|
||||
"A contribution to a collection which forms a self-contained unit with a distinct author\n and title. The `author` refers to the `title`, the `editor` to the `booktitle`, i. e.,\n the title of the collection.\n\nRequired fields: `author`, `title`, `booktitle`, `year/date`",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@suppcollection",
|
||||
category: BibtexEntryTypeCategory::Collection,
|
||||
documentation: Some("Supplemental material in a `@collection`. This type is similar to `@suppbook` but\n related to the `@collection` entry type. The standard styles will treat this entry\n type as an alias for `@incollection`."),
|
||||
documentation: Some(
|
||||
"Supplemental material in a `@collection`. This type is similar to `@suppbook` but\n related to the `@collection` entry type. The standard styles will treat this entry\n type as an alias for `@incollection`.",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@manual",
|
||||
category: BibtexEntryTypeCategory::Misc,
|
||||
documentation: Some("Technical or other documentation, not necessarily in printed form. The author or\n editor is omissible.\n\nRequired fields: `author/editor`, `title`, `year/date`"),
|
||||
documentation: Some(
|
||||
"Technical or other documentation, not necessarily in printed form. The author or\n editor is omissible.\n\nRequired fields: `author/editor`, `title`, `year/date`",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@misc",
|
||||
category: BibtexEntryTypeCategory::Misc,
|
||||
documentation: Some("A fallback type for entries which do not fit into any other category. Use the field\n howpublished to supply publishing information in free format, if applicable. The\n field type may be useful as well. author, editor, and year are omissible.\n\nRequired fields: `author/editor`, `title`, `year/date`"),
|
||||
documentation: Some(
|
||||
"A fallback type for entries which do not fit into any other category. Use the field\n howpublished to supply publishing information in free format, if applicable. The\n field type may be useful as well. author, editor, and year are omissible.\n\nRequired fields: `author/editor`, `title`, `year/date`",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@online",
|
||||
category: BibtexEntryTypeCategory::Misc,
|
||||
documentation: Some("An online resource. `author`, `editor`, and `year` are omissible.\n This entry type is intended for sources such as web sites which are intrinsically\n online resources. Note that all entry types support the url field. For example, when\n adding an article from an online journal, it may be preferable to use the `@article`\n type and its url field.\n\nRequired fields: `author/editor`, `title`, `year/date`, `url`"),
|
||||
documentation: Some(
|
||||
"An online resource. `author`, `editor`, and `year` are omissible.\n This entry type is intended for sources such as web sites which are intrinsically\n online resources. Note that all entry types support the url field. For example, when\n adding an article from an online journal, it may be preferable to use the `@article`\n type and its url field.\n\nRequired fields: `author/editor`, `title`, `year/date`, `url`",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@patent",
|
||||
category: BibtexEntryTypeCategory::Misc,
|
||||
documentation: Some("A patent or patent request. The number or record token is given in the number\n field. Use the type field to specify the type and the location field to indicate the\n scope of the patent, if different from the scope implied by the type. Note that the\n location field is treated as a key list with this entry type.\n\nRequired fields: `author`, `title`, `number`, `year/date`"),
|
||||
documentation: Some(
|
||||
"A patent or patent request. The number or record token is given in the number\n field. Use the type field to specify the type and the location field to indicate the\n scope of the patent, if different from the scope implied by the type. Note that the\n location field is treated as a key list with this entry type.\n\nRequired fields: `author`, `title`, `number`, `year/date`",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@periodical",
|
||||
category: BibtexEntryTypeCategory::Misc,
|
||||
documentation: Some("An complete issue of a periodical, such as a special issue of a journal. The title of\n the periodical is given in the title field. If the issue has its own title in addition to\n the main title of the periodical, it goes in the issuetitle field. The editor is\n omissible.\n\nRequired fields: `editor`, `title`, `year/date`"),
|
||||
documentation: Some(
|
||||
"An complete issue of a periodical, such as a special issue of a journal. The title of\n the periodical is given in the title field. If the issue has its own title in addition to\n the main title of the periodical, it goes in the issuetitle field. The editor is\n omissible.\n\nRequired fields: `editor`, `title`, `year/date`",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@suppperiodical",
|
||||
category: BibtexEntryTypeCategory::Misc,
|
||||
documentation: Some("Supplemental material in a `@periodical`. This type is similar to `@suppbook`\n but related to the `@periodical` entry type. The role of this entry type may be\n more obvious if you bear in mind that the `@article` type could also be called\n `@inperiodical`. This type may be useful when referring to items such as regular\n columns, obituaries, letters to the editor, etc. which only have a generic title. Style\n guides may require such items to be formatted differently from articles in the strict\n sense of the word. The standard styles will treat this entry type as an alias for\n `@article`."),
|
||||
documentation: Some(
|
||||
"Supplemental material in a `@periodical`. This type is similar to `@suppbook`\n but related to the `@periodical` entry type. The role of this entry type may be\n more obvious if you bear in mind that the `@article` type could also be called\n `@inperiodical`. This type may be useful when referring to items such as regular\n columns, obituaries, letters to the editor, etc. which only have a generic title. Style\n guides may require such items to be formatted differently from articles in the strict\n sense of the word. The standard styles will treat this entry type as an alias for\n `@article`.",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@proceedings",
|
||||
category: BibtexEntryTypeCategory::Book,
|
||||
documentation: Some("A single-volume conference proceedings. This type is very similar to `@collection`.\n It supports an optional organization field which holds the sponsoring institution.\n The editor is omissible.\n\nRequired fields: `title`, `year/date`"),
|
||||
documentation: Some(
|
||||
"A single-volume conference proceedings. This type is very similar to `@collection`.\n It supports an optional organization field which holds the sponsoring institution.\n The editor is omissible.\n\nRequired fields: `title`, `year/date`",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@mvproceedings",
|
||||
category: BibtexEntryTypeCategory::Book,
|
||||
documentation: Some("A multi-volume `@proceedings` entry. For backwards compatibility, multi-volume\n proceedings are also supported by the entry type `@proceedings`. However, it is\n advisable to make use of the dedicated entry type `@mvproceedings`\n\nRequired fields: `title`, `year/date`"),
|
||||
documentation: Some(
|
||||
"A multi-volume `@proceedings` entry. For backwards compatibility, multi-volume\n proceedings are also supported by the entry type `@proceedings`. However, it is\n advisable to make use of the dedicated entry type `@mvproceedings`\n\nRequired fields: `title`, `year/date`",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@inproceedings",
|
||||
category: BibtexEntryTypeCategory::Part,
|
||||
documentation: Some("An article in a conference proceedings. This type is similar to `@incollection`. It\n supports an optional `organization` field.\n\nRequired fields: `author`, `title`, `booktitle`, `year/date`"),
|
||||
documentation: Some(
|
||||
"An article in a conference proceedings. This type is similar to `@incollection`. It\n supports an optional `organization` field.\n\nRequired fields: `author`, `title`, `booktitle`, `year/date`",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@reference",
|
||||
category: BibtexEntryTypeCategory::Collection,
|
||||
documentation: Some("A single-volume work of reference such as an encyclopedia or a dictionary. This is a\n more specific variant of the generic `@collection` entry type. The standard styles\n will treat this entry type as an alias for `@collection`."),
|
||||
documentation: Some(
|
||||
"A single-volume work of reference such as an encyclopedia or a dictionary. This is a\n more specific variant of the generic `@collection` entry type. The standard styles\n will treat this entry type as an alias for `@collection`.",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@mvreference",
|
||||
category: BibtexEntryTypeCategory::Collection,
|
||||
documentation: Some("A multi-volume `@reference` entry. The standard styles will treat this entry type\n as an alias for `@mvcollection`. For backwards compatibility, multi-volume references\n are also supported by the entry type `@reference`. However, it is advisable\n to make use of the dedicated entry type `@mvreference`."),
|
||||
documentation: Some(
|
||||
"A multi-volume `@reference` entry. The standard styles will treat this entry type\n as an alias for `@mvcollection`. For backwards compatibility, multi-volume references\n are also supported by the entry type `@reference`. However, it is advisable\n to make use of the dedicated entry type `@mvreference`.",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@inreference",
|
||||
category: BibtexEntryTypeCategory::Part,
|
||||
documentation: Some("An article in a work of reference. This is a more specific variant of the generic\n `@incollection` entry type. The standard styles will treat this entry type as an\n alias for `@incollection`."),
|
||||
documentation: Some(
|
||||
"An article in a work of reference. This is a more specific variant of the generic\n `@incollection` entry type. The standard styles will treat this entry type as an\n alias for `@incollection`.",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@report",
|
||||
category: BibtexEntryTypeCategory::Misc,
|
||||
documentation: Some("A technical report, research report, or white paper published by a university or some\n other institution. Use the `type` field to specify the type of report. The sponsoring\n institution goes in the `institution` field.\n\nRequired fields: `author`, `title`, `type`, `institution`, `year/date`"),
|
||||
documentation: Some(
|
||||
"A technical report, research report, or white paper published by a university or some\n other institution. Use the `type` field to specify the type of report. The sponsoring\n institution goes in the `institution` field.\n\nRequired fields: `author`, `title`, `type`, `institution`, `year/date`",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@set",
|
||||
|
|
@ -184,17 +232,23 @@ pub static BIBTEX_ENTRY_TYPES: &[BibtexEntryType<'static>] = &[
|
|||
BibtexEntryType {
|
||||
name: "@thesis",
|
||||
category: BibtexEntryTypeCategory::Thesis,
|
||||
documentation: Some("A thesis written for an educational institution to satisfy the requirements for a degree.\n Use the `type` field to specify the type of thesis.\n\nRequired fields: `author`, `title`, `type`, `institution`, `year/date`"),
|
||||
documentation: Some(
|
||||
"A thesis written for an educational institution to satisfy the requirements for a degree.\n Use the `type` field to specify the type of thesis.\n\nRequired fields: `author`, `title`, `type`, `institution`, `year/date`",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@unpublished",
|
||||
category: BibtexEntryTypeCategory::Misc,
|
||||
documentation: Some("A work with an author and a title which has not been formally published, such as\n a manuscript or the script of a talk. Use the fields `howpublished` and `note` to\n supply additional information in free format, if applicable.\n\nRequired fields: `author`, `title`, `year/date`"),
|
||||
documentation: Some(
|
||||
"A work with an author and a title which has not been formally published, such as\n a manuscript or the script of a talk. Use the fields `howpublished` and `note` to\n supply additional information in free format, if applicable.\n\nRequired fields: `author`, `title`, `year/date`",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@xdata",
|
||||
category: BibtexEntryTypeCategory::Misc,
|
||||
documentation: Some("This entry type is special. `@xdata` entries hold data which may be inherited by other\n entries using the `xdata` field. Entries of this type only serve as data containers;\n they may not be cited or added to the bibliography."),
|
||||
documentation: Some(
|
||||
"This entry type is special. `@xdata` entries hold data which may be inherited by other\n entries using the `xdata` field. Entries of this type only serve as data containers;\n they may not be cited or added to the bibliography.",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@conference",
|
||||
|
|
@ -209,17 +263,23 @@ pub static BIBTEX_ENTRY_TYPES: &[BibtexEntryType<'static>] = &[
|
|||
BibtexEntryType {
|
||||
name: "@mastersthesis",
|
||||
category: BibtexEntryTypeCategory::Thesis,
|
||||
documentation: Some("Similar to `@thesis` except that the `type` field is optional and defaults to the\n localised term ‘Master’s thesis’. You may still use the `type` field to override that."),
|
||||
documentation: Some(
|
||||
"Similar to `@thesis` except that the `type` field is optional and defaults to the\n localised term ‘Master’s thesis’. You may still use the `type` field to override that.",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@phdthesis",
|
||||
category: BibtexEntryTypeCategory::Thesis,
|
||||
documentation: Some("Similar to `@thesis` except that the `type` field is optional and defaults to the\n localised term ‘PhD thesis’. You may still use the `type` field to override that."),
|
||||
documentation: Some(
|
||||
"Similar to `@thesis` except that the `type` field is optional and defaults to the\n localised term ‘PhD thesis’. You may still use the `type` field to override that.",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@techreport",
|
||||
category: BibtexEntryTypeCategory::Misc,
|
||||
documentation: Some("Similar to `@report` except that the `type` field is optional and defaults to the\n localised term ‘technical report’. You may still use the `type` field to override that."),
|
||||
documentation: Some(
|
||||
"Similar to `@report` except that the `type` field is optional and defaults to the\n localised term ‘technical report’. You may still use the `type` field to override that.",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@www",
|
||||
|
|
@ -229,22 +289,30 @@ pub static BIBTEX_ENTRY_TYPES: &[BibtexEntryType<'static>] = &[
|
|||
BibtexEntryType {
|
||||
name: "@artwork",
|
||||
category: BibtexEntryTypeCategory::Misc,
|
||||
documentation: Some("Works of the visual arts such as paintings, sculpture, and installations."),
|
||||
documentation: Some(
|
||||
"Works of the visual arts such as paintings, sculpture, and installations.",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@audio",
|
||||
category: BibtexEntryTypeCategory::Misc,
|
||||
documentation: Some("Audio recordings, typically on audio cd, dvd, audio cassette, or similar media. See\n also `@music`."),
|
||||
documentation: Some(
|
||||
"Audio recordings, typically on audio cd, dvd, audio cassette, or similar media. See\n also `@music`.",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@bibnote",
|
||||
category: BibtexEntryTypeCategory::Misc,
|
||||
documentation: Some("This special entry type is not meant to be used in the `bib` file like other types. It is\n provided for third-party packages like `notes2bib` which merge notes into the bibliography.\n The notes should go into the `note` field. Be advised that the `@bibnote`\n type is not related to the `defbibnote` command in any way. `defbibnote`\n is for adding comments at the beginning or the end of the bibliography, whereas\n the `@bibnote` type is meant for packages which render endnotes as bibliography\n entries."),
|
||||
documentation: Some(
|
||||
"This special entry type is not meant to be used in the `bib` file like other types. It is\n provided for third-party packages like `notes2bib` which merge notes into the bibliography.\n The notes should go into the `note` field. Be advised that the `@bibnote`\n type is not related to the `defbibnote` command in any way. `defbibnote`\n is for adding comments at the beginning or the end of the bibliography, whereas\n the `@bibnote` type is meant for packages which render endnotes as bibliography\n entries.",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@commentary",
|
||||
category: BibtexEntryTypeCategory::Misc,
|
||||
documentation: Some("Commentaries which have a status different from regular books, such as legal commentaries."),
|
||||
documentation: Some(
|
||||
"Commentaries which have a status different from regular books, such as legal commentaries.",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@image",
|
||||
|
|
@ -284,12 +352,16 @@ pub static BIBTEX_ENTRY_TYPES: &[BibtexEntryType<'static>] = &[
|
|||
BibtexEntryType {
|
||||
name: "@performance",
|
||||
category: BibtexEntryTypeCategory::Misc,
|
||||
documentation: Some("Musical and theatrical performances as well as other works of the performing arts.\n This type refers to the event as opposed to a recording, a score, or a printed play."),
|
||||
documentation: Some(
|
||||
"Musical and theatrical performances as well as other works of the performing arts.\n This type refers to the event as opposed to a recording, a score, or a printed play.",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@review",
|
||||
category: BibtexEntryTypeCategory::Misc,
|
||||
documentation: Some("Reviews of some other work. This is a more specific variant of the `@article` type.\n The standard styles will treat this entry type as an alias for `@article`."),
|
||||
documentation: Some(
|
||||
"Reviews of some other work. This is a more specific variant of the `@article` type.\n The standard styles will treat this entry type as an alias for `@article`.",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@software",
|
||||
|
|
@ -299,13 +371,17 @@ pub static BIBTEX_ENTRY_TYPES: &[BibtexEntryType<'static>] = &[
|
|||
BibtexEntryType {
|
||||
name: "@standard",
|
||||
category: BibtexEntryTypeCategory::Misc,
|
||||
documentation: Some("National and international standards issued by a standards body such as the International\n Organization for Standardization."),
|
||||
documentation: Some(
|
||||
"National and international standards issued by a standards body such as the International\n Organization for Standardization.",
|
||||
),
|
||||
},
|
||||
BibtexEntryType {
|
||||
name: "@video",
|
||||
category: BibtexEntryTypeCategory::Misc,
|
||||
documentation: Some("Audiovisual recordings, typically on dvd, vhs cassette, or similar media. See also\n `@movie`."),
|
||||
}
|
||||
documentation: Some(
|
||||
"Audiovisual recordings, typically on dvd, vhs cassette, or similar media. See also\n `@movie`.",
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
pub static BIBTEX_FIELD_TYPES: &[BibtexFieldType<'static>] = &[
|
||||
|
|
@ -892,5 +968,5 @@ pub static BIBTEX_FIELD_TYPES: &[BibtexFieldType<'static>] = &[
|
|||
BibtexFieldType {
|
||||
name: "school",
|
||||
documentation: "An alias for `institution`, provided for BibTeX compatibility. The `institution` field is used by traditional BibTeX for technical reports whereas the `school` field holds the institution associated with theses. The `biblatex` package employs the generic field name `institution` in both cases.",
|
||||
}
|
||||
},
|
||||
];
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@ mod root;
|
|||
pub use self::{
|
||||
discover::{discover, watch},
|
||||
graph::{DirectLinkData, Edge, EdgeData, Graph, HOME_DIR},
|
||||
project::{parents, Project},
|
||||
project::{Project, parents},
|
||||
root::ProjectRoot,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ use percent_encoding::percent_decode_str;
|
|||
use rustc_hash::FxHashSet;
|
||||
use url::Url;
|
||||
|
||||
use crate::{semantics, util, Document, Workspace};
|
||||
use crate::{Document, Workspace, semantics, util};
|
||||
|
||||
use super::ProjectRoot;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ use std::sync::Arc;
|
|||
use distro::FileNameDB;
|
||||
use url::Url;
|
||||
|
||||
use crate::{util, DocumentData, Workspace};
|
||||
use crate::{DocumentData, Workspace, util};
|
||||
|
||||
use super::graph::HOME_DIR;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@ use std::path::PathBuf;
|
|||
use distro::Language;
|
||||
use line_index::{LineCol, LineIndex};
|
||||
use rowan::TextRange;
|
||||
use syntax::{bibtex, file_list::FileList, latex, latexmkrc::LatexmkrcData, BuildError};
|
||||
use syntax::{BuildError, bibtex, file_list::FileList, latex, latexmkrc::LatexmkrcData};
|
||||
use url::Url;
|
||||
|
||||
use crate::{semantics, Config};
|
||||
use crate::{Config, semantics};
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Hash)]
|
||||
pub enum Owner {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use bibtex_utils::field::text::TextFieldData;
|
||||
use itertools::Itertools;
|
||||
use rowan::{ast::AstNode, TextRange};
|
||||
use rowan::{TextRange, ast::AstNode};
|
||||
use rustc_hash::FxHashMap;
|
||||
use syntax::bibtex::{self, HasName, HasType, HasValue};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use rowan::{ast::AstNode, TextRange};
|
||||
use rowan::{TextRange, ast::AstNode};
|
||||
use rustc_hash::FxHashSet;
|
||||
use syntax::latex::{self, HasBrack, HasCurly};
|
||||
use titlecase::titlecase;
|
||||
|
|
|
|||
|
|
@ -5,6 +5,6 @@ mod regex_filter;
|
|||
|
||||
pub use self::{
|
||||
expand::expand_relative_path,
|
||||
label::{render_label, FloatKind, RenderedLabel, RenderedObject},
|
||||
label::{FloatKind, RenderedLabel, RenderedObject, render_label},
|
||||
regex_filter::filter_regex_patterns,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ use rowan::TextRange;
|
|||
use self::RenderedObject::*;
|
||||
|
||||
use crate::{
|
||||
Workspace,
|
||||
deps::Project,
|
||||
semantics::tex::{Label, LabelObject},
|
||||
Workspace,
|
||||
};
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@ use rustc_hash::FxHashMap;
|
|||
use url::Url;
|
||||
|
||||
use crate::{
|
||||
Document, DocumentLocation, Workspace,
|
||||
deps::Project,
|
||||
semantics::{bib, tex},
|
||||
Document, DocumentLocation, Workspace,
|
||||
};
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Hash)]
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ use rowan::{TextLen, TextRange};
|
|||
use rustc_hash::{FxHashMap, FxHashSet};
|
||||
use url::Url;
|
||||
|
||||
use crate::{deps, Config, Document, DocumentParams, Owner};
|
||||
use crate::{Config, Document, DocumentParams, Owner, deps};
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
pub struct Workspace {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use line_index::LineIndex;
|
||||
use rowan::{ast::AstNode, NodeOrToken};
|
||||
use rowan::{NodeOrToken, ast::AstNode};
|
||||
use syntax::bibtex::{self, HasName, HasType, HasValue};
|
||||
|
||||
pub struct Options {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use expect_test::{expect, Expect};
|
||||
use expect_test::{Expect, expect};
|
||||
use line_index::LineIndex;
|
||||
use syntax::bibtex;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use human_name::Name;
|
|||
use itertools::Itertools;
|
||||
use syntax::bibtex::Value;
|
||||
|
||||
use super::{text::TextFieldData, FieldParseCache};
|
||||
use super::{FieldParseCache, text::TextFieldData};
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Hash)]
|
||||
pub enum AuthorField {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ use std::{fmt, ops::Add, str::FromStr};
|
|||
use chrono::{Datelike, Month, NaiveDate};
|
||||
use syntax::bibtex::Value;
|
||||
|
||||
use super::{text::TextFieldData, FieldParseCache};
|
||||
use super::{FieldParseCache, text::TextFieldData};
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Hash)]
|
||||
pub enum DateField {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ use std::fmt;
|
|||
|
||||
use syntax::bibtex::Value;
|
||||
|
||||
use super::{text::TextFieldData, FieldParseCache};
|
||||
use super::{FieldParseCache, text::TextFieldData};
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Hash)]
|
||||
pub enum NumberField {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use rowan::{ast::AstNode, NodeOrToken};
|
||||
use rowan::{NodeOrToken, ast::AstNode};
|
||||
|
||||
use syntax::bibtex::{
|
||||
Accent, Command, CurlyGroup, HasAccentName, HasCommandName, HasName, HasWord, Join, Literal,
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
use base_db::semantics::bib::Semantics;
|
||||
use bibtex_utils::field::{
|
||||
FieldParseCache,
|
||||
author::{AuthorField, AuthorFieldData},
|
||||
date::{DateField, DateFieldData},
|
||||
number::{NumberField, NumberFieldData},
|
||||
text::{TextField, TextFieldData},
|
||||
FieldParseCache,
|
||||
};
|
||||
use rustc_hash::FxHashMap;
|
||||
use syntax::bibtex::{Entry, Field, HasName, HasType, HasValue, Value};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use base_db::semantics::bib::Semantics;
|
||||
use expect_test::{expect, Expect};
|
||||
use expect_test::{Expect, expect};
|
||||
use parser::parse_bibtex;
|
||||
use rowan::ast::AstNode;
|
||||
use syntax::bibtex;
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ use std::{
|
|||
|
||||
use anyhow::Result;
|
||||
use base_db::{
|
||||
deps::{self, ProjectRoot},
|
||||
Workspace,
|
||||
deps::{self, ProjectRoot},
|
||||
};
|
||||
use bstr::io::BufReadExt;
|
||||
use crossbeam_channel::Sender;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use base_db::Document;
|
||||
use rowan::{ast::AstNode, TextRange, TextSize};
|
||||
use rowan::{TextRange, TextSize, ast::AstNode};
|
||||
use syntax::latex;
|
||||
|
||||
#[derive(Debug)]
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use std::process::Stdio;
|
||||
|
||||
use anyhow::Result;
|
||||
use base_db::{deps::ProjectRoot, Document, Workspace};
|
||||
use base_db::{Document, Workspace, deps::ProjectRoot};
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Hash)]
|
||||
pub enum CleanTarget {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use std::io::Write;
|
||||
|
||||
use anyhow::Result;
|
||||
use base_db::{deps::Edge, Workspace};
|
||||
use base_db::{Workspace, deps::Edge};
|
||||
use itertools::Itertools;
|
||||
use rustc_hash::FxHashMap;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use base_db::{semantics::Span, Document, DocumentData};
|
||||
use rowan::{ast::AstNode, TextRange, TextSize};
|
||||
use base_db::{Document, DocumentData, semantics::Span};
|
||||
use rowan::{TextRange, TextSize, ast::AstNode};
|
||||
use syntax::latex;
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Clone)]
|
||||
|
|
@ -43,7 +43,7 @@ pub fn find_environments(document: &Document, offset: TextSize) -> Vec<Environme
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use expect_test::{expect, Expect};
|
||||
use expect_test::{Expect, expect};
|
||||
use test_utils::fixture::Fixture;
|
||||
|
||||
use crate::find_environments;
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ use std::{path::PathBuf, process::Stdio};
|
|||
|
||||
use anyhow::Result;
|
||||
use base_db::{
|
||||
deps::{self, ProjectRoot},
|
||||
Document, Workspace,
|
||||
deps::{self, ProjectRoot},
|
||||
};
|
||||
use thiserror::Error;
|
||||
use url::Url;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ mod placeholders;
|
|||
|
||||
pub use self::{
|
||||
build::{BuildCommand, BuildError},
|
||||
change_env::{change_environment, ChangeEnvironmentResult},
|
||||
change_env::{ChangeEnvironmentResult, change_environment},
|
||||
clean::{CleanCommand, CleanTarget},
|
||||
dep_graph::show_dependency_graph,
|
||||
find_envs::find_environments,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use base_db::{FeatureParams, Owner, Workspace};
|
||||
use completion::CompletionParams;
|
||||
use criterion::{criterion_group, criterion_main, Criterion};
|
||||
use criterion::{Criterion, criterion_group, criterion_main};
|
||||
use distro::Language;
|
||||
use line_index::LineCol;
|
||||
use rowan::TextSize;
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@ mod providers;
|
|||
mod util;
|
||||
|
||||
use base_db::{
|
||||
Document, FeatureParams,
|
||||
data::{BibtexEntryType, BibtexFieldType},
|
||||
semantics::bib,
|
||||
util::RenderedObject,
|
||||
Document, FeatureParams,
|
||||
};
|
||||
use rowan::{TextRange, TextSize};
|
||||
use util::CompletionBuilder;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
use base_db::semantics::Span;
|
||||
use completion_data::included_packages;
|
||||
use rowan::{ast::AstNode, TokenAtOffset};
|
||||
use rowan::{TokenAtOffset, ast::AstNode};
|
||||
use syntax::latex;
|
||||
|
||||
use crate::{
|
||||
util::{is_inside_latex_curly, CompletionBuilder},
|
||||
ArgumentData, CompletionItem, CompletionItemData, CompletionParams,
|
||||
util::{CompletionBuilder, is_inside_latex_curly},
|
||||
};
|
||||
|
||||
pub fn complete_arguments<'a>(
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ use rowan::ast::AstNode;
|
|||
use syntax::latex;
|
||||
|
||||
use crate::{
|
||||
util::{find_curly_group_word_list, CompletionBuilder},
|
||||
CitationData, CompletionItem, CompletionItemData, CompletionParams,
|
||||
util::{CompletionBuilder, find_curly_group_word_list},
|
||||
};
|
||||
|
||||
pub fn complete_citations<'a>(
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ use rowan::ast::AstNode;
|
|||
use syntax::latex;
|
||||
|
||||
use crate::{
|
||||
util::{find_curly_group_word, CompletionBuilder},
|
||||
CompletionItem, CompletionItemData, CompletionParams,
|
||||
util::{CompletionBuilder, find_curly_group_word},
|
||||
};
|
||||
|
||||
pub fn complete_colors<'a>(
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ use rowan::ast::AstNode;
|
|||
use syntax::latex;
|
||||
|
||||
use crate::{
|
||||
util::{find_curly_group_word, find_curly_group_word_list, CompletionBuilder},
|
||||
CompletionItem, CompletionItemData, CompletionParams,
|
||||
util::{CompletionBuilder, find_curly_group_word, find_curly_group_word_list},
|
||||
};
|
||||
|
||||
pub fn complete_color_models<'a>(
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
use base_db::{semantics::Span, DocumentData};
|
||||
use base_db::{DocumentData, semantics::Span};
|
||||
use completion_data::included_packages;
|
||||
use rowan::{TextRange, TextSize};
|
||||
use syntax::{bibtex, latex};
|
||||
|
||||
use crate::{
|
||||
util::{CompletionBuilder, ProviderContext},
|
||||
CommandData, CompletionItem, CompletionItemData, CompletionParams,
|
||||
util::{CompletionBuilder, ProviderContext},
|
||||
};
|
||||
|
||||
static DELIMITERS: &[(&str, &str)] = &[("(", ")"), ("[", "]"), ("{", "\\}")];
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ use base_db::semantics::Span;
|
|||
use syntax::bibtex;
|
||||
|
||||
use crate::{
|
||||
util::CompletionBuilder, CompletionItem, CompletionItemData, CompletionParams, EntryTypeData,
|
||||
CompletionItem, CompletionItemData, CompletionParams, EntryTypeData, util::CompletionBuilder,
|
||||
};
|
||||
|
||||
pub fn complete_entry_types<'a>(
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ use rowan::ast::AstNode;
|
|||
use syntax::latex;
|
||||
|
||||
use crate::{
|
||||
util::{find_curly_group_word, CompletionBuilder, ProviderContext},
|
||||
CompletionItem, CompletionItemData, CompletionParams, EnvironmentData,
|
||||
util::{CompletionBuilder, ProviderContext, find_curly_group_word},
|
||||
};
|
||||
|
||||
pub fn complete_environments<'a>(
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
use base_db::semantics::Span;
|
||||
use rowan::{ast::AstNode, TokenAtOffset};
|
||||
use rowan::{TokenAtOffset, ast::AstNode};
|
||||
use syntax::bibtex::{self, HasName};
|
||||
|
||||
use crate::{
|
||||
util::CompletionBuilder, CompletionItem, CompletionItemData, CompletionParams, FieldTypeData,
|
||||
CompletionItem, CompletionItemData, CompletionParams, FieldTypeData, util::CompletionBuilder,
|
||||
};
|
||||
|
||||
pub fn complete_fields<'a>(
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ use rowan::ast::AstNode;
|
|||
use syntax::latex;
|
||||
|
||||
use crate::{
|
||||
util::{find_curly_group_word, CompletionBuilder, ProviderContext},
|
||||
CompletionItem, CompletionItemData, CompletionParams, GlossaryEntryData,
|
||||
util::{CompletionBuilder, ProviderContext, find_curly_group_word},
|
||||
};
|
||||
|
||||
pub fn complete_acronyms<'a>(
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ use rustc_hash::FxHashSet;
|
|||
use syntax::latex;
|
||||
|
||||
use crate::{
|
||||
util::{find_curly_group_word_list, CompletionBuilder},
|
||||
CompletionItem, CompletionItemData, CompletionParams,
|
||||
util::{CompletionBuilder, find_curly_group_word_list},
|
||||
};
|
||||
|
||||
pub fn complete_imports<'a>(
|
||||
|
|
|
|||
|
|
@ -4,15 +4,16 @@ use std::{
|
|||
};
|
||||
|
||||
use base_db::{
|
||||
DocumentData, FeatureParams,
|
||||
deps::{self, ProjectRoot},
|
||||
util, DocumentData, FeatureParams,
|
||||
util,
|
||||
};
|
||||
use rowan::{ast::AstNode, TextLen, TextRange};
|
||||
use rowan::{TextLen, TextRange, ast::AstNode};
|
||||
use syntax::latex;
|
||||
|
||||
use crate::{
|
||||
util::{find_curly_group_word_list, CompletionBuilder},
|
||||
CompletionItem, CompletionItemData, CompletionParams,
|
||||
util::{CompletionBuilder, find_curly_group_word_list},
|
||||
};
|
||||
|
||||
pub fn complete_includes<'a>(
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use base_db::{
|
||||
semantics::{
|
||||
tex::{Label, LabelKind},
|
||||
Span,
|
||||
tex::{Label, LabelKind},
|
||||
},
|
||||
util::queries::Object,
|
||||
};
|
||||
|
|
@ -10,8 +10,8 @@ use rustc_hash::FxHashSet;
|
|||
use syntax::latex;
|
||||
|
||||
use crate::{
|
||||
util::{find_curly_group_word, CompletionBuilder},
|
||||
CompletionParams,
|
||||
util::{CompletionBuilder, find_curly_group_word},
|
||||
};
|
||||
|
||||
pub fn complete_label_definitions<'a>(
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
use base_db::{
|
||||
semantics::{tex::LabelKind, Span},
|
||||
util::{render_label, RenderedObject},
|
||||
DocumentData,
|
||||
semantics::{Span, tex::LabelKind},
|
||||
util::{RenderedObject, render_label},
|
||||
};
|
||||
use rowan::ast::AstNode;
|
||||
use syntax::latex;
|
||||
|
||||
use crate::{
|
||||
util::{find_curly_group_word, find_curly_group_word_list, CompletionBuilder},
|
||||
CompletionItem, CompletionItemData, CompletionParams,
|
||||
util::{CompletionBuilder, find_curly_group_word, find_curly_group_word_list},
|
||||
};
|
||||
|
||||
fn trim_prefix<'a>(prefix: Option<&'a str>, text: &'a str) -> &'a str {
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ use rowan::ast::AstNode;
|
|||
use syntax::latex;
|
||||
|
||||
use crate::{
|
||||
util::{find_curly_group_word_list, CompletionBuilder},
|
||||
CompletionItem, CompletionItemData, CompletionParams,
|
||||
util::{CompletionBuilder, find_curly_group_word_list},
|
||||
};
|
||||
|
||||
pub fn complete_tikz_libraries<'a>(
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use base_db::{Config, FeatureParams};
|
||||
use expect_test::{expect, Expect};
|
||||
use expect_test::{Expect, expect};
|
||||
use parser::SyntaxConfig;
|
||||
use rowan::TextRange;
|
||||
|
||||
|
|
@ -2345,7 +2345,9 @@ fn test_custom_label_multiple_prefix_ref() {
|
|||
#[test]
|
||||
fn test_custom_glossary_reference_command() {
|
||||
let mut config = SyntaxConfig::default();
|
||||
config.glossary_reference_commands.insert("glsed".to_string());
|
||||
config
|
||||
.glossary_reference_commands
|
||||
.insert("glsed".to_string());
|
||||
|
||||
check_with_syntax_config(
|
||||
config,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use base_db::semantics::Span;
|
||||
use rowan::{ast::AstNode, TextRange, TextSize};
|
||||
use rowan::{TextRange, TextSize, ast::AstNode};
|
||||
use syntax::latex;
|
||||
|
||||
use crate::CompletionParams;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use base_db::DocumentData;
|
||||
use rowan::{ast::AstNode, TextRange};
|
||||
use rowan::{TextRange, ast::AstNode};
|
||||
use syntax::latex;
|
||||
|
||||
use crate::DefinitionContext;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use base_db::{deps, Document, Workspace};
|
||||
use base_db::{Document, Workspace, deps};
|
||||
use line_index::LineCol;
|
||||
use multimap::MultiMap;
|
||||
use rowan::{TextLen, TextRange, TextSize};
|
||||
|
|
|
|||
|
|
@ -5,15 +5,15 @@ use std::{
|
|||
};
|
||||
|
||||
use base_db::{
|
||||
deps::{self, ProjectRoot},
|
||||
Document, Workspace,
|
||||
deps::{self, ProjectRoot},
|
||||
};
|
||||
use encoding_rs_io::DecodeReaderBytesBuilder;
|
||||
use line_index::LineCol;
|
||||
use once_cell::sync::Lazy;
|
||||
use regex::Regex;
|
||||
|
||||
use crate::{types::Diagnostic, ChktexError, ChktexSeverity};
|
||||
use crate::{ChktexError, ChktexSeverity, types::Diagnostic};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Command {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
use base_db::{
|
||||
Document, Workspace,
|
||||
deps::Project,
|
||||
semantics::{bib::Entry, tex::Citation},
|
||||
util::queries::{self, Object},
|
||||
Document, Workspace,
|
||||
};
|
||||
use rustc_hash::{FxHashMap, FxHashSet};
|
||||
use url::Url;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use base_db::{BibDocumentData, Document};
|
||||
use multimap::MultiMap;
|
||||
use rowan::{ast::AstNode, TextRange};
|
||||
use rowan::{TextRange, ast::AstNode};
|
||||
use syntax::bibtex::{self, HasDelims, HasEq, HasName, HasType, HasValue};
|
||||
use url::Url;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use base_db::{Config, Document, TexDocumentData};
|
||||
use multimap::MultiMap;
|
||||
use rowan::{ast::AstNode, NodeOrToken, TextRange};
|
||||
use rowan::{NodeOrToken, TextRange, ast::AstNode};
|
||||
use syntax::latex;
|
||||
use url::Url;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use base_db::{
|
||||
DocumentData, Workspace,
|
||||
semantics::tex::{Label, LabelKind},
|
||||
util::queries,
|
||||
DocumentData, Workspace,
|
||||
};
|
||||
use itertools::Itertools;
|
||||
use rustc_hash::{FxHashMap, FxHashSet};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use base_db::{
|
||||
deps::Project, util::filter_regex_patterns, Document, DocumentData, Owner, Workspace,
|
||||
Document, DocumentData, Owner, Workspace, deps::Project, util::filter_regex_patterns,
|
||||
};
|
||||
use multimap::MultiMap;
|
||||
use rowan::TextRange;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use expect_test::{expect, Expect};
|
||||
use expect_test::{Expect, expect};
|
||||
use itertools::Itertools;
|
||||
|
||||
fn check(input: &str, expect: Expect) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use base_db::{Document, DocumentData};
|
||||
use rowan::{ast::AstNode, TextRange};
|
||||
use rowan::{TextRange, ast::AstNode};
|
||||
use syntax::{
|
||||
bibtex::{self, HasDelims, HasName},
|
||||
latex,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use expect_test::{expect, Expect};
|
||||
use expect_test::{Expect, expect};
|
||||
|
||||
fn check(input: &str, expect: Expect) {
|
||||
let fixture = test_utils::fixture::Fixture::parse(input);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use base_db::{util::queries, DocumentData};
|
||||
use base_db::{DocumentData, util::queries};
|
||||
use rowan::ast::AstNode;
|
||||
use syntax::bibtex;
|
||||
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@ mod package;
|
|||
mod string_ref;
|
||||
|
||||
use base_db::{
|
||||
FeatureParams,
|
||||
data::{BibtexEntryType, BibtexFieldType},
|
||||
util::RenderedLabel,
|
||||
FeatureParams,
|
||||
};
|
||||
use rowan::{TextRange, TextSize};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use expect_test::{expect, Expect};
|
||||
use expect_test::{Expect, expect};
|
||||
|
||||
use crate::HoverParams;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use base_db::{
|
||||
FeatureParams,
|
||||
semantics::tex::{Label, LabelKind},
|
||||
util::{queries::Object, render_label},
|
||||
FeatureParams,
|
||||
};
|
||||
use rustc_hash::FxHashMap;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
mod label;
|
||||
|
||||
use base_db::{util::RenderedLabel, FeatureParams};
|
||||
use base_db::{FeatureParams, util::RenderedLabel};
|
||||
use rowan::{TextRange, TextSize};
|
||||
|
||||
pub struct InlayHintParams<'a> {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use expect_test::{expect, Expect};
|
||||
use expect_test::{Expect, expect};
|
||||
use rowan::{TextLen, TextRange};
|
||||
|
||||
fn check(input: &str, expect: Expect) {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ use std::{
|
|||
path::PathBuf,
|
||||
};
|
||||
|
||||
use serde::{de::DeserializeOwned, Serialize};
|
||||
use serde::{Serialize, de::DeserializeOwned};
|
||||
|
||||
#[cfg(unix)]
|
||||
use std::os::unix::net::{UnixListener, UnixStream};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use base_db::{
|
||||
deps::{self, EdgeData},
|
||||
DocumentLocation, FeatureParams,
|
||||
deps::{self, EdgeData},
|
||||
};
|
||||
|
||||
pub(super) fn find_links<'a>(
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use expect_test::{expect, Expect};
|
||||
use expect_test::{Expect, expect};
|
||||
|
||||
fn check(input: &str, expect: Expect) {
|
||||
let fixture = test_utils::fixture::Fixture::parse(input);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use expect_test::{expect, Expect};
|
||||
use expect_test::{Expect, expect};
|
||||
|
||||
use crate::parse_bibtex;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use expect_test::{expect, Expect};
|
||||
use expect_test::{Expect, expect};
|
||||
|
||||
use crate::parse_build_log;
|
||||
|
||||
|
|
|
|||
|
|
@ -243,7 +243,7 @@ static DEFAULT_GLOSSARY_REFERENCE_COMMANDS: &[&str] = &[
|
|||
"GLSuserv",
|
||||
"glsuservi",
|
||||
"Glsuservi",
|
||||
"GLSuservi"
|
||||
"GLSuservi",
|
||||
];
|
||||
|
||||
static DEFAULT_LABEL_DEFINITION_COMMANDS: &[&str] = &["label", "zlabel"];
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ use syntax::latex::SyntaxKind::{self, *};
|
|||
use crate::SyntaxConfig;
|
||||
|
||||
use self::lexer::{
|
||||
types::{CommandName, ParagraphLevel, SectionLevel, Token},
|
||||
Lexer,
|
||||
types::{CommandName, ParagraphLevel, SectionLevel, Token},
|
||||
};
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
|
|
|
|||
|
|
@ -26,9 +26,8 @@ pub fn classify(name: &str, config: &SyntaxConfig) -> CommandName {
|
|||
"includesvg" => CommandName::SvgInclude,
|
||||
"includeinkscape" => CommandName::InkscapeInclude,
|
||||
"verbatiminput" | "VerbatimInput" => CommandName::VerbatimInclude,
|
||||
"import" | "subimport" | "inputfrom" | "subinputfrom" | "includefrom" | "subincludefrom" => {
|
||||
CommandName::Import
|
||||
}
|
||||
"import" | "subimport" | "inputfrom" | "subinputfrom" | "includefrom"
|
||||
| "subincludefrom" => CommandName::Import,
|
||||
"newlabel" => CommandName::LabelNumber,
|
||||
"def" | "gdef" | "edef" | "xdef" | "let" | "glet" => CommandName::OldCommandDefinition,
|
||||
"newcommand"
|
||||
|
|
@ -91,7 +90,9 @@ pub fn classify(name: &str, config: &SyntaxConfig) -> CommandName {
|
|||
"numberline" => CommandName::TocNumberLine,
|
||||
|
||||
_ if config.citation_commands.contains(name) => CommandName::Citation,
|
||||
_ if config.glossary_reference_commands.contains(name) => CommandName::GlossaryEntryReference,
|
||||
_ if config.glossary_reference_commands.contains(name) => {
|
||||
CommandName::GlossaryEntryReference
|
||||
}
|
||||
_ if config.label_definition_commands.contains(name) => CommandName::LabelDefinition,
|
||||
_ if config.label_reference_commands.contains(name) => CommandName::LabelReference,
|
||||
_ if config.label_reference_range_commands.contains(name) => {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use expect_test::{expect, Expect};
|
||||
use expect_test::{Expect, expect};
|
||||
|
||||
use crate::{parse_latex, SyntaxConfig};
|
||||
use crate::{SyntaxConfig, parse_latex};
|
||||
|
||||
fn check(input: &str, expect: Expect) {
|
||||
let root = syntax::latex::SyntaxNode::new_root(parse_latex(input, &SyntaxConfig::default()));
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use base_db::{semantics::Span, DocumentLocation};
|
||||
use base_db::{DocumentLocation, semantics::Span};
|
||||
use rowan::ast::AstNode;
|
||||
use rustc_hash::FxHashSet;
|
||||
use syntax::latex;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use base_db::{
|
||||
DocumentData, DocumentLocation,
|
||||
semantics::{bib, tex},
|
||||
util::queries::{self, Object},
|
||||
DocumentData, DocumentLocation,
|
||||
};
|
||||
|
||||
use crate::{Reference, ReferenceContext, ReferenceKind};
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use base_db::{
|
||||
DocumentLocation,
|
||||
semantics::tex,
|
||||
util::queries::{self, Object},
|
||||
DocumentLocation,
|
||||
};
|
||||
|
||||
use crate::{Reference, ReferenceContext, ReferenceKind};
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use base_db::{semantics::Span, DocumentData};
|
||||
use base_db::{DocumentData, semantics::Span};
|
||||
use rowan::{TextRange, TextSize};
|
||||
use syntax::latex;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use base_db::{
|
||||
semantics::{bib, tex, Span},
|
||||
util::queries::{self},
|
||||
DocumentData,
|
||||
semantics::{Span, bib, tex},
|
||||
util::queries::{self},
|
||||
};
|
||||
|
||||
use crate::{RenameBuilder, RenameParams};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use base_db::{
|
||||
semantics::{tex, Span},
|
||||
semantics::{Span, tex},
|
||||
util::queries::{self, Object},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
mod bib;
|
||||
mod tex;
|
||||
|
||||
use base_db::{deps::Project, util, Document, DocumentData, SymbolConfig, Workspace};
|
||||
use base_db::{Document, DocumentData, SymbolConfig, Workspace, deps::Project, util};
|
||||
|
||||
use crate::Symbol;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use std::cmp::Reverse;
|
|||
|
||||
use base_db::Workspace;
|
||||
|
||||
use crate::{document_symbols, types::SymbolLocation, SymbolKind};
|
||||
use crate::{SymbolKind, document_symbols, types::SymbolLocation};
|
||||
|
||||
use self::sort::ProjectOrdering;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use expect_test::{expect, Expect};
|
||||
use expect_test::{Expect, expect};
|
||||
use test_utils::fixture::Fixture;
|
||||
|
||||
use crate::workspace_symbols;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use rowan::{ast::AstNode, NodeOrToken};
|
||||
use rowan::{NodeOrToken, ast::AstNode};
|
||||
|
||||
use super::{
|
||||
BibtexLanguage,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use itertools::{EitherOrBoth, Itertools};
|
||||
use rowan::{ast::AstNode, TextRange};
|
||||
use rowan::{TextRange, ast::AstNode};
|
||||
|
||||
use super::{
|
||||
LatexLanguage,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use criterion::{black_box, criterion_group, criterion_main, Criterion};
|
||||
use parser::{parse_latex, SyntaxConfig};
|
||||
use criterion::{Criterion, black_box, criterion_group, criterion_main};
|
||||
use parser::{SyntaxConfig, parse_latex};
|
||||
|
||||
const CODE: &str = include_str!("../../../texlab.tex");
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
use std::sync::{
|
||||
atomic::{AtomicI32, Ordering},
|
||||
Arc,
|
||||
atomic::{AtomicI32, Ordering},
|
||||
};
|
||||
|
||||
use anyhow::{bail, Result};
|
||||
use anyhow::{Result, bail};
|
||||
use crossbeam_channel::Sender;
|
||||
use lsp_server::{ErrorCode, Message, Request, RequestId, Response};
|
||||
use lsp_types::{notification::ShowMessage, MessageType, ShowMessageParams};
|
||||
use lsp_types::{MessageType, ShowMessageParams, notification::ShowMessage};
|
||||
use parking_lot::Mutex;
|
||||
use rustc_hash::FxHashMap;
|
||||
use serde::{de::DeserializeOwned, Serialize};
|
||||
use serde::{Serialize, de::DeserializeOwned};
|
||||
|
||||
use crate::server::options::Options;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use base_db::{DocumentLocation, Workspace};
|
||||
|
||||
use crate::util::{from_proto, to_proto, ClientFlags};
|
||||
use crate::util::{ClientFlags, from_proto, to_proto};
|
||||
|
||||
pub fn goto_definition(
|
||||
workspace: &Workspace,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use base_db::Workspace;
|
||||
|
||||
use crate::util::{from_proto, to_proto, ClientFlags};
|
||||
use crate::util::{ClientFlags, from_proto, to_proto};
|
||||
|
||||
pub fn find_all(
|
||||
workspace: &Workspace,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ use std::{
|
|||
process::{Command, Stdio},
|
||||
};
|
||||
|
||||
use base_db::{deps::ProjectRoot, Document, LatexIndentConfig, Workspace};
|
||||
use base_db::{Document, LatexIndentConfig, Workspace, deps::ProjectRoot};
|
||||
use distro::Language;
|
||||
use rowan::TextLen;
|
||||
use tempfile::tempdir;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use base_db::Workspace;
|
||||
|
||||
use crate::util::{from_proto, to_proto, ClientFlags};
|
||||
use crate::util::{ClientFlags, from_proto, to_proto};
|
||||
|
||||
pub fn document_symbols(
|
||||
workspace: &Workspace,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue