AutoYADM commit: 2025-06-10 15:28:37
This commit is contained in:
parent
b654a2f572
commit
f096e44679
2 changed files with 21 additions and 11 deletions
|
@ -237,6 +237,13 @@ define-command -params 2 lsp-diag-query %{
|
|||
}
|
||||
}
|
||||
|
||||
hook global KakEnd .* %{
|
||||
nop %sh{
|
||||
printf 'exit\n' >"$kak_opt_diagpipe_in"
|
||||
read result < "$kak_opt_diagpipe_out"
|
||||
}
|
||||
}
|
||||
|
||||
define-command lsp-diag-hover-enable %{
|
||||
hook window User lsp-diag-hover-false %{
|
||||
try inlay-diagnostics-off
|
||||
|
@ -252,13 +259,6 @@ define-command lsp-diag-hover-enable %{
|
|||
hook window WinSetOption lsp_inline_diagnostics=.* %{
|
||||
lsp-diag-set
|
||||
}
|
||||
hook global KakEnd .* %{
|
||||
nop %sh{
|
||||
printf 'exit\n' >"$kak_opt_diagpipe_in"
|
||||
read result < "$kak_opt_diagpipe_out"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
hook global User lsp-enabled %{
|
||||
|
|
|
@ -9,6 +9,7 @@ import os
|
|||
import tempfile
|
||||
import signal
|
||||
import types
|
||||
import selectors
|
||||
|
||||
Position = tuple[int, int]
|
||||
SpecList = list[tuple[Position, Position]]
|
||||
|
@ -104,12 +105,21 @@ def main():
|
|||
sys.stdout.flush()
|
||||
daemonize(in_path, out_path, fifo_dir)
|
||||
|
||||
with open(in_path, "r") as infile, open(out_path, "w") as outfile:
|
||||
diagnostics: SpecList = []
|
||||
while True:
|
||||
line = infile.readline()
|
||||
sel = selectors.DefaultSelector()
|
||||
infile = open(in_path, "r", buffering=1)
|
||||
outfile = open(out_path, "w", buffering=1)
|
||||
sel.register(infile.fileno(), selectors.EVENT_READ, data=infile)
|
||||
|
||||
# with open(in_path, "r") as infile, open(out_path, "w") as outfile:
|
||||
diagnostics: SpecList = []
|
||||
while True:
|
||||
for key, _ in sel.select(timeout=None):
|
||||
infile_obj = key.data
|
||||
line = infile_obj.readline()
|
||||
# line = infile.readline()
|
||||
if not line:
|
||||
continue
|
||||
line = line.strip()
|
||||
assert isinstance(line, str)
|
||||
# # subprocess.run(["notify-send", f"Received command: {line}"])
|
||||
if line.startswith("set "):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue