Merge branch 'helix-editor:master' into scroll_preview_fixed

pull/11441/head
Shaun_Sheep 2 months ago committed by GitHub
commit de73b1accf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -14,7 +14,7 @@ jobs:
uses: actions/checkout@v4
- name: Install nix
uses: cachix/install-nix-action@V27
uses: cachix/install-nix-action@V28
- name: Authenticate with Cachix
uses: cachix/cachix-action@v15

16
Cargo.lock generated

@ -68,9 +68,9 @@ dependencies = [
[[package]]
name = "anyhow"
version = "1.0.87"
version = "1.0.89"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "10f00e1f6e58a40e807377c75c6a7f97bf9044fab57816f2414e6f5f4499d7b8"
checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6"
[[package]]
name = "arc-swap"
@ -136,9 +136,9 @@ checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53"
[[package]]
name = "cc"
version = "1.1.18"
version = "1.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b62ac837cdb5cb22e10a256099b4fc502b1dfe560cb282963a974d7abd80e476"
checksum = "2d74707dde2ba56f86ae90effb3b43ddd369504387e718014de010cec7959800"
dependencies = [
"shlex",
]
@ -1972,9 +1972,9 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
[[package]]
name = "rustix"
version = "0.38.36"
version = "0.38.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f55e80d50763938498dd5ebb18647174e0c76dc38c5505294bb224624f30f36"
checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811"
dependencies = [
"bitflags",
"errno",
@ -2401,9 +2401,9 @@ dependencies = [
[[package]]
name = "unicode-segmentation"
version = "1.11.0"
version = "1.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202"
checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493"
[[package]]
name = "unicode-width"

@ -163,7 +163,7 @@
| protobuf | ✓ | ✓ | ✓ | `bufls`, `pb` |
| prql | ✓ | | | |
| purescript | ✓ | ✓ | | `purescript-language-server` |
| python | ✓ | ✓ | ✓ | `pylsp` |
| python | ✓ | ✓ | ✓ | `ruff`, `jedi-language-server`, `pylsp` |
| qml | ✓ | | ✓ | `qmlls` |
| r | ✓ | | | `R` |
| racket | ✓ | | ✓ | `racket` |

@ -22,7 +22,7 @@ helix-loader = { path = "../helix-loader" }
ropey = { version = "1.6.1", default-features = false, features = ["simd"] }
smallvec = "1.13"
smartstring = "1.0.1"
unicode-segmentation = "1.11"
unicode-segmentation = "1.12"
# unicode-width is changing width definitions
# that both break our logic and disagree with common
# width definitions in terminals, we need to replace it.

@ -846,7 +846,15 @@ impl Application {
}
}
Notification::ShowMessage(params) => {
log::warn!("unhandled window/showMessage: {:?}", params);
if self.config.load().editor.lsp.display_messages {
match params.typ {
lsp::MessageType::ERROR => self.editor.set_error(params.message),
lsp::MessageType::WARNING => {
self.editor.set_warning(params.message)
}
_ => self.editor.set_status(params.message),
}
}
}
Notification::LogMessage(params) => {
log::info!("window/logMessage: {:?}", params);
@ -930,7 +938,7 @@ impl Application {
self.lsp_progress.update(server_id, token, work);
}
if self.config.load().editor.lsp.display_messages {
if self.config.load().editor.lsp.display_progress_messages {
self.editor.set_status(status);
}
}

@ -20,7 +20,7 @@ helix-core = { path = "../helix-core" }
bitflags = "2.6"
cassowary = "0.3"
unicode-segmentation = "1.11"
unicode-segmentation = "1.12"
crossterm = { version = "0.28", optional = true }
termini = "1.0"
serde = { version = "1", "optional" = true, features = ["derive"]}

@ -421,7 +421,9 @@ pub fn get_terminal_provider() -> Option<TerminalConfig> {
pub struct LspConfig {
/// Enables LSP
pub enable: bool,
/// Display LSP progress messages below statusline
/// Display LSP messagess from $/progress below statusline
pub display_progress_messages: bool,
/// Display LSP messages from window/showMessage below statusline
pub display_messages: bool,
/// Enable automatic pop up of signature help (parameter hints)
pub auto_signature_help: bool,
@ -439,7 +441,8 @@ impl Default for LspConfig {
fn default() -> Self {
Self {
enable: true,
display_messages: false,
display_progress_messages: false,
display_messages: true,
auto_signature_help: true,
display_signature_help_docs: true,
display_inlay_hints: false,
@ -1271,6 +1274,13 @@ impl Editor {
self.status_msg = Some((error, Severity::Error));
}
#[inline]
pub fn set_warning<T: Into<Cow<'static, str>>>(&mut self, warning: T) {
let warning = warning.into();
log::warn!("editor warning: {}", warning);
self.status_msg = Some((warning, Severity::Warning));
}
#[inline]
pub fn get_status(&self) -> Option<(&Cow<'static, str>, &Severity)> {
self.status_msg.as_ref().map(|(status, sev)| (status, sev))

@ -44,12 +44,13 @@ haskell-language-server = { command = "haskell-language-server-wrapper", args =
idris2-lsp = { command = "idris2-lsp" }
intelephense = { command = "intelephense", args = ["--stdio"] }
jdtls = { command = "jdtls" }
jedi = { command = "jedi-language-server" }
jq-lsp = { command = "jq-lsp" }
jsonnet-language-server = { command = "jsonnet-language-server", args= ["-t", "--lint"] }
julia = { command = "julia", timeout = 60, args = [ "--startup-file=no", "--history-file=no", "--quiet", "-e", "using LanguageServer; runserver()", ] }
koka = { command = "koka", args = ["--language-server", "--lsstdio"] }
kotlin-language-server = { command = "kotlin-language-server" }
lean = { command = "lean", args = [ "--server" ] }
lean = { command = "lean", args = [ "--server", "--memory=1024" ] }
ltex-ls = { command = "ltex-ls" }
markdoc-ls = { command = "markdoc-ls", args = ["--stdio"] }
markdown-oxide = { command = "markdown-oxide" }
@ -84,6 +85,7 @@ racket = { command = "racket", args = ["-l", "racket-langserver"] }
regols = { command = "regols" }
rescript-language-server = { command = "rescript-language-server", args = ["--stdio"] }
robotframework_ls = { command = "robotframework_ls" }
ruff = { command = "ruff", args = ["server"] }
serve-d = { command = "serve-d" }
slint-lsp = { command = "slint-lsp", args = [] }
solargraph = { command = "solargraph", args = ["stdio"] }
@ -852,7 +854,7 @@ file-types = ["py", "pyi", "py3", "pyw", "ptl", "rpy", "cpy", "ipy", "pyt", { gl
shebangs = ["python"]
roots = ["pyproject.toml", "setup.py", "poetry.lock", "pyrightconfig.json"]
comment-token = "#"
language-servers = [ "pylsp" ]
language-servers = ["ruff", "jedi", "pylsp"]
# TODO: pyls needs utf-8 offsets
indent = { tab-width = 4, unit = " " }

@ -28,6 +28,8 @@
"ui.virtual.jump-label" = { fg = "lightblue", modifiers = ["italic", "bold"] }
"ui.bufferline" = { fg = "grey04", bg = "grey00" }
"ui.bufferline.active" = { fg = "grey07", bg = "grey02" }
"ui.picker.header.column" = { fg = "grey05", modifiers = ["italic", "bold"] }
"ui.picker.header.column.active" = { fg = "grey05", bg = "grey03", modifiers = ["italic", "bold"] }
"operator" = "grey05"
"variable" = "white"

@ -33,7 +33,7 @@ tag = "red"
"ui.selection" = { bg = "selection" }
"ui.virtual.indent-guide" = { fg = "gray" }
"ui.virtual.whitespace" = { fg = "light-gray" }
"ui.virtual.ruler" = { bg ="dark-bg" }
"ui.virtual.ruler" = { bg = "dark-bg" }
"ui.statusline" = { bg = "dark-bg", fg = "light-gray" }
"ui.popup" = { bg = "dark-bg", fg = "orange" }
"ui.help" = { bg = "dark-bg", fg = "orange" }
@ -43,6 +43,8 @@ tag = "red"
"ui.bufferline" = { bg = "dark-bg", fg = "light-gray" }
"ui.bufferline.active" = { bg = "dark-bg", fg = "orange" }
"ui.virtual.jump-label" = { fg = "pink", modifiers = ["bold"] }
"ui.picker.header.column" = { fg = "orange", underline.style = "line" }
"ui.picker.header.column.active" = { fg = "purple", modifiers = ["bold"], underline.style = "line" }
# Diagnostics
"diagnostic" = { underline = { style = "curl" } }

@ -1,119 +1,124 @@
# Author : Timothy DeHerrera <tim@nrdxp.dev>
"comment".fg = "comment"
"constant".fg = "purple"
"constant.builtin".fg = "olive"
"constant.character".fg = "carnation"
"constant.builtin".fg = "olive"
"constant.character.escape".fg = "magenta"
"constant.numeric".fg = "cyan"
"constant.numeric.float".fg = "red"
"constant.character".fg = "carnation"
"constant".fg = "purple"
"constant.numeric".fg = "cyan"
"constant.numeric.float".fg = "red"
"function".fg = "green"
"function.builtin".fg = "sand"
"function.macro".fg = "blue"
"function.method".fg = "opal"
"function".fg = "green"
"function.macro".fg = "blue"
"function.method".fg = "opal"
"keyword" = { fg = "magenta", modifiers = ["bold"] }
"keyword.operator" = { fg = "coral", modifiers = ["bold"] }
"keyword.function" = { fg = "lilac", modifiers = ["bold"] }
"keyword.control" = { fg = "carnation", modifiers = ["bold"]}
"keyword" = { fg = "magenta", modifiers = ["bold"] }
"keyword.control" = { fg = "carnation", modifiers = ["bold"] }
"keyword.control.exception" = { fg = "red", modifiers = ["bold"] }
"keyword.storage" = { fg = "coral", modifiers = ["bold"] }
"keyword.function" = { fg = "lilac", modifiers = ["bold"] }
"keyword.operator" = { fg = "coral", modifiers = ["bold"] }
"keyword.storage" = { fg = "coral", modifiers = ["bold"] }
"operator".fg = "coral"
"punctuation".fg = "magenta"
"punctuation.bracket".fg = "foreground"
"punctuation.delimiter".fg = "coral"
"punctuation.bracket".fg = "foreground"
"punctuation".fg = "magenta"
"string".fg = "yellow"
"attribute".fg = "opal"
"string".fg = "yellow"
"string.regexp".fg = "red"
"string.special".fg = "blue"
"string.regexp".fg = "red"
"tag".fg = "carnation"
"attribute".fg = "opal"
"tag".fg = "carnation"
"type".fg = "opal"
"type.variant".fg = "sand"
"type.builtin".fg = "yellow"
"type.builtin".fg = "yellow"
"type.enum.variant".fg = "sand"
"type".fg = "opal"
"type.variant".fg = "sand"
"variable".fg = "cyan"
"variable.builtin".fg = "olive"
"variable.builtin".fg = "olive"
"variable".fg = "cyan"
"variable.other.member".fg = "lilac"
"variable.parameter" = { fg ="blue", modifiers = ["italic"] }
"variable.parameter" = { fg = "blue", modifiers = ["italic"] }
"namespace".fg = "olive"
"constructor".fg = "sand"
"special".fg = "magenta"
"label".fg = "magenta"
"label".fg = "magenta"
"namespace".fg = "olive"
"special".fg = "magenta"
"diff.plus".fg = "green"
"diff.delta".fg = "blue"
"diff.minus".fg = "red"
"ui.background" = { fg = "foreground", bg = "background" }
"ui.cursor" = { fg = "background", bg = "blue", modifiers = ["dim"] }
"ui.cursor.match" = { fg = "green", modifiers = ["underlined"] }
"ui.cursor.primary" = { fg = "background", bg = "cyan", modifiers = ["dim"] }
"ui.help" = { fg = "foreground", bg = "background_dark" }
"ui.linenr" = { fg = "comment" }
"ui.linenr.selected" = { fg = "foreground" }
"ui.menu" = { fg = "foreground", bg = "background_dark" }
"ui.menu.selected" = { fg = "cyan", bg = "background_dark" }
"ui.popup" = { fg = "foreground", bg = "background_dark" }
"ui.selection" = { bg = "secondary_highlight" }
"ui.selection.primary" = { bg = "primary_highlight" }
"ui.cursorline" = { bg = "background_dark" }
"ui.statusline" = { fg = "foreground", bg = "background_dark" }
"ui.statusline.inactive" = { fg = "comment", bg = "background_dark" }
"ui.statusline.insert" = { fg = "olive", bg = "background_dark" }
"ui.statusline.normal" = { fg = "opal", bg = "background_dark" }
"ui.statusline.select" = { fg = "carnation", bg = "background_dark" }
"ui.text" = { fg = "foreground" }
"ui.text.focus" = { fg = "cyan" }
"ui.window" = { fg = "foreground" }
"ui.virtual.whitespace" = { fg = "comment" }
"diff.plus".fg = "green"
"ui.background" = { fg = "foreground", bg = "background" }
"ui.cursor" = { fg = "background", bg = "blue", modifiers = ["dim"] }
"ui.cursor.match" = { fg = "green", modifiers = ["underlined"] }
"ui.cursor.primary" = { fg = "background", bg = "cyan", modifiers = ["dim"] }
"ui.cursorline" = { bg = "background_dark" }
"ui.help" = { fg = "foreground", bg = "background_dark" }
"ui.linenr" = { fg = "comment" }
"ui.linenr.selected" = { fg = "foreground" }
"ui.menu" = { fg = "foreground", bg = "background_dark" }
"ui.menu.selected" = { fg = "cyan", bg = "background_dark" }
"ui.popup" = { fg = "foreground", bg = "background_dark" }
"ui.selection" = { bg = "secondary_highlight" }
"ui.selection.primary" = { bg = "primary_highlight" }
"ui.statusline" = { fg = "foreground", bg = "background_dark" }
"ui.statusline.inactive" = { fg = "comment", bg = "background_dark" }
"ui.statusline.insert" = { fg = "olive", bg = "background_dark" }
"ui.statusline.normal" = { fg = "opal", bg = "background_dark" }
"ui.statusline.select" = { fg = "carnation", bg = "background_dark" }
"ui.text" = { fg = "foreground" }
"ui.text.focus" = { fg = "cyan" }
"ui.virtual.indent-guide" = { fg = "opal" }
"ui.virtual.ruler" = { bg = "background_dark" }
"ui.virtual.ruler" = { bg = "background_dark" }
"ui.virtual.whitespace" = { fg = "comment" }
"ui.window" = { fg = "foreground" }
"error" = { fg = "red" }
"error" = { fg = "red" }
"warning" = { fg = "cyan" }
"diagnostic" = { underline = { style = "line", color = "coral" }, bg = "cyan" }
"diagnostic.deprecated" = { modifiers = ["crossed_out"] }
"diagnostic.error" = { underline = { style = "curl", color = "red" } }
"diagnostic.hint" = { underline = { style = "line", color = "cyan" } }
"diagnostic.info" = { underline = { style = "line" } }
"diagnostic.unnecessary" = { modifiers = ["dim"] }
"diagnostic.deprecated" = { modifiers = ["crossed_out"] }
"markup.heading" = { fg = "purple", modifiers = ["bold"] }
"markup.link.label" = { fg = "blue", modifiers = ["italic"] }
"markup.list" = "cyan"
"markup.bold" = { fg = "blue", modifiers = ["bold"] }
"markup.italic" = { fg = "yellow", modifiers = ["italic"] }
"diagnostic.warning" = { underline = { style = "curl", color = "yellow" } }
"markup.bold" = { fg = "blue", modifiers = ["bold"] }
"markup.heading" = { fg = "purple", modifiers = ["bold"] }
"markup.italic" = { fg = "yellow", modifiers = ["italic"] }
"markup.link.label" = { fg = "blue", modifiers = ["italic"] }
"markup.link.text" = "magenta"
"markup.link.url" = "cyan"
"markup.list" = "cyan"
"markup.quote" = { fg = "yellow", modifiers = ["italic"] }
"markup.raw" = { fg = "foreground" }
"markup.strikethrough" = { modifiers = ["crossed_out"] }
"markup.link.url" = "cyan"
"markup.link.text" = "magenta"
"markup.quote" = { fg = "yellow", modifiers = ["italic"] }
"markup.raw" = { fg = "foreground" }
[palette]
background = "#282a36"
background_dark = "#21222c"
primary_highlight = "#800049"
background = "#282a36"
background_dark = "#21222c"
comment = "#a39e9b"
foreground = "#eff0eb"
primary_highlight = "#800049"
secondary_highlight = "#4d4f66"
foreground = "#eff0eb"
comment = "#a39e9b"
# main colors
red = "#ff5c57"
blue = "#57c7ff"
yellow = "#f3f99d"
green = "#5af78e"
purple = "#bd93f9"
cyan = "#9aedfe"
blue = "#57c7ff"
cyan = "#9aedfe"
green = "#5af78e"
magenta = "#ff6ac1"
purple = "#bd93f9"
red = "#ff5c57"
yellow = "#f3f99d"
# aux colors
lilac = "#c9c5fb"
coral = "#f97c7c"
sand = "#ffab6f"
carnation = "#f99fc6"
olive = "#b6d37c"
opal = "#b1d7c7"
coral = "#f97c7c"
lilac = "#c9c5fb"
olive = "#b6d37c"
opal = "#b1d7c7"
sand = "#ffab6f"

Loading…
Cancel
Save