;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. #@13 (fn PATH) (defalias 'omnisharp--path-to-server #[257 "\211\203\301=\203\302!\207\207" [system-type cygwin cygwin-convert-file-name-to-windows] 3 (#$ . 87)]) #@13 (fn PATH) (defalias 'omnisharp--path-from-server #[257 "\211\203\301=\203\302!\207\207" [system-type cygwin cygwin-convert-file-name-from-windows] 3 (#$ . 258)]) #@13 (fn ITEM) (defalias 'omnisharp--get-filename #[257 "\300\301\236A!\207" [omnisharp--path-from-server FileName] 4 (#$ . 434)]) #@13 (fn PATH) (defalias 'omnisharp--to-filename #[257 "\300\301!B\207" [FileName omnisharp--path-to-server] 4 (#$ . 569)]) #@366 Takes a list of QuickFix objects and writes them to the compilation buffer with HEADER as its header. Shows the buffer when finished. If DONT-SAVE-OLD-POS is specified, will not save current position to find-tag-marker-ring. This is so this function may be used without messing with the ring. (fn QUICKFIXES BUFFER-NAME BUFFER-HEADER &optional DONT-SAVE-OLD-POS) (defalias 'omnisharp--write-quickfixes-to-compilation-buffer #[1027 "\301\302\"\303\304!#\210?\205\305\306 \"\210\307\310 !\207" [find-tag-marker-ring mapcar omnisharp--find-usages-output-to-compilation-output omnisharp--write-lines-to-compilation-buffer get-buffer-create ring-insert point-marker omnisharp--show-last-buffer-position-saved-message buffer-file-name] 9 (#$ . 698)]) #@452 Writes the given lines to the given buffer, and sets compilation-mode on. The contents of the buffer are erased. The buffer is marked read-only after inserting all lines. LINES-TO-WRITE are the lines to write, as-is. If HEADER is given, that is written to the top of the buffer. Expects the lines to be in a format that compilation-mode recognizes, so that the user may jump to the results. (fn LINES-TO-WRITE BUFFER-TO-WRITE-TO &optional HEADER) (defalias 'omnisharp--write-lines-to-compilation-buffer #[770 "rq\210\302\303\304!\203\304\305!\210\202\305\306 \210\211\203\211c\210\307\310\"\210\311 \210\303\304!\2034\304\302!\210\2026\302\312!*\207" [inhibit-read-only buffer-read-only t fboundp read-only-mode nil erase-buffer mapc #[257 "\211c\210\300c\207" ["\n"] 2 "\n\n(fn ELEMENT)"] compilation-mode display-buffer] 6 (#$ . 1461)]) #@218 Converts a single element of a /findusages JSON response to a format that the compilation major mode understands and lets the user follow results to the locations in the actual files. (fn JSON-RESULT-SINGLE-ELEMENT) (defalias 'omnisharp--find-usages-output-to-compilation-output #[257 "\300!\301\236A\302\236A\303\236A\304\305!\304\305!\306\307\260\207" [omnisharp--get-filename Line Column Text ":" prin1-to-string ": \n" "\n"] 13 (#$ . 2325)]) #@549 Sets the buffer contents to new-buffer-contents for the buffer visiting filename-for-buffer. If no buffer is visiting that file, does nothing. Afterwards moves point to the coordinates RESULT-POINT-LINE and RESULT-POINT-COLUMN. If RESULT-POINT-LINE and RESULT-POINT-COLUMN are not given, and a buffer exists for FILENAME-FOR-BUFFER, its current positions are used. If a buffer does not exist, the file is visited and the default point position is used. (fn FILENAME-FOR-BUFFER NEW-BUFFER-CONTENTS &optional RESULT-POINT-LINE RESULT-POINT-COLUMN) (defalias 'omnisharp--set-buffer-contents-to #[1026 "\300 \301\302\"\216\303\304\"\210\206\305 \262\206\306 \262\307 \210c\210\310#)\207" [current-window-configuration make-closure #[0 "\301\300!\207" [V0 set-window-configuration] 2] omnisharp--find-file-possibly-in-other-window nil line-number-at-pos omnisharp--current-column erase-buffer omnisharp-go-to-file-line-and-column-worker] 9 (#$ . 2790)]) #@103 Returns the current column, converting tab characters in a way that the OmniSharp server understands. (defalias 'omnisharp--current-column #[0 "\301iT)\207" [tab-width 1] 1 (#$ . 3763)]) #@18 (fn FILE-NAME) (defalias 'omnisharp--buffer-exists-for-file-name #[257 "\300\301 !\302\303\302\211\211\203=\211A\262\242\262\262\211\262\203=\304!\230\2030\302\262\203=\262\262T\262\202\n\266\207" [-non-nil buffer-list nil 0 buffer-file-name] 11 (#$ . 3957)]) (defalias 'omnisharp--get-current-buffer-contents #[0 "\300\301\302!\301\303!\"\207" [buffer-substring-no-properties buffer-end 0 1] 4]) #@34 Kills the *omnisharp-log* buffer (defalias 'omnisharp--log-reset #[0 "\300\301!\211\205\n\302!\207" [get-buffer "*omnisharp-log*" kill-buffer] 3 (#$ . 4388)]) #@65 Writes message to the log. (fn SINGLE-OR-MULTILINE-LOG-STRING) (defalias 'omnisharp--log #[257 "\300\301\302!\303 \304\305\"\216rq\210db\210\306\307!c\210c\210\310c*\262\262!\207" [shut-up get-buffer-create "*omnisharp-log*" current-window-configuration make-closure #[0 "\301\300!\207" [V0 set-window-configuration] 2] format-time-string "[%H:%M:%S] " "\n"] 7 (#$ . 4555)]) #@196 Deserialize the given JSON-STRING to a lisp object. If something goes wrong, return a pseudo-packet alist with keys ServerMessageParseError and Message. (fn JSON-STRING &optional ERROR-MESSAGE) (defalias 'omnisharp--json-read-from-string #[513 "\3011 \302!0\207\203\303\304\305#!\210\306\206\307B\310BD\207" [omnisharp-debug (error) json-read-from-string omnisharp--log format "omnisharp--json-read-from-string error: %s reading input %s" ServerMessageParseError "Error communicating to the OmniSharpServer instance" Message] 8 (#$ . 4943)]) #@140 In the current buffer, replaces the given SYMBOL-TO-REPLACE (a string) with REPLACEMENT-STRING. (fn SYMBOL-TO-REPLACE REPLACEMENT-STRING) (defalias 'omnisharp--replace-symbol-in-buffer-with #[514 "\300!\210\301\302\211#\207" [search-backward replace-match t] 6 (#$ . 5505)]) #@110 Inserts the given text at the top of the current file without moving point. (fn FULL-IMPORT-TEXT-TO-INSERT) (defalias 'omnisharp--insert-namespace-import #[257 "\212\300 \210\301\302\261\210\303 )\207" [beginning-of-buffer "using " ";" newline] 4 (#$ . 5790)]) (defalias 'omnisharp--current-word-or-empty-string #[0 "\300\301!\206\302\207" [thing-at-point symbol ""] 2]) #@12 (fn VAL) (defalias 'omnisharp--t-or-json-false #[257 "\211\203\300\207\301\207" [t :json-false] 2 (#$ . 6172)]) #@58 (fn SOLUTION-FILE-PATH &optional SERVER-EXE-FILE-PATH) (defalias 'omnisharp--get-omnisharp-server-executable-command #[513 "\302\303=\203 \202\f!\302!\304E \305=\204' \306=\204'\307\310\"\204(\207\311B\207" [omnisharp-server-executable-path system-type expand-file-name nil "-s" cygwin windows-nt s-ends-with\? ".exe" "mono"] 8 (#$ . 6294)]) #@25 (fn &optional BUFFER) (defalias 'omnisharp--update-buffer #[256 "\211\206p\262\300\301\302\303 \"!\207" [omnisharp--wait-until-request-completed omnisharp--send-command-to-server "updatebuffer" omnisharp--get-request-object] 5 (#$ . 6657)]) #@31 (fn FILE-NAME TEXT-CHANGES) (defalias 'omnisharp--update-files-with-text-changes #[514 "\300\301!!r\211q\210\302\303\")\207" [find-file omnisharp--convert-backslashes-to-forward-slashes -map omnisharp--apply-text-change-to-buffer] 6 (#$ . 6909)]) #@343 Takes a LinePositionSpanTextChange and applies it to the current buffer. If this is used as a response handler, the call to the server must be blocking (synchronous) so the user doesn't have time to switch the buffer to some other buffer. That would cause the changes to be applied to that buffer instead. (fn TEXT-CHANGE &optional BUFFER) (defalias 'omnisharp--apply-text-change-to-buffer #[513 "r\211\206pq\210\212\300\236A\301\236A\302\236A\303\236A\304\236A\305S\"\210`\305S\"\210`|\210b\210\306\307\310 #c\266\207*\207" [NewText StartLine StartColumn EndLine EndColumn omnisharp--go-to-line-and-column s-replace " " ""] 13 (#$ . 7167)]) #@19 (fn REQUEST-ID) (defalias 'omnisharp--handler-exists-for-request #[257 "\301\302\236A\303\301\211\211\2037\211A\262\242\262\262\211\262\2037@U\211\262\2047\262\262T\262\202 \266\211\262\205@\304\207" [omnisharp--server-info nil :response-handlers 0 t] 9 (#$ . 7833)]) #@45 (fn REQUEST-ID &optional TIMEOUT-SECONDS) (defalias 'omnisharp--wait-until-request-completed #[513 "\211\206\301\262\302 \303\236A\304!\2035\305\302 \"A@V\203-\306\307#\310!\210\311!\266\312\313\"\210\202 \266\207" [omnisharp--server-info 30 current-time :process omnisharp--handler-exists-for-request time-subtract format "Request %s did not complete in %s seconds" omnisharp--log error accept-process-output 0.1] 8 (#$ . 8135)]) #@217 Mockable wrapper for completing-read. The problem with mocking completing-read directly is that sometimes the mocks are not removed when an error occurs. This renders the developer's emacs unusable. (fn &rest ARGS) (defalias 'omnisharp--completing-read #[128 "\300\301\"\207" [apply completing-read] 4 (#$ . 8593)]) #@106 Mockable wrapper for read-string, see `omnisharp--completing-read' for the explanation. (fn &rest ARGS) (defalias 'omnisharp--read-string #[128 "\300\301\"\207" [apply read-string] 4 (#$ . 8918)]) #@69 Makes a directory recursively, similarly to a 'mkdir -p'. (fn DIR) (defalias 'omnisharp--mkdirp #[257 "\300!\301!\302\303\304\305\306\307\"\"!A\"\210\207" [expand-file-name f-split omnisharp--mkdirp-item f-join apply concat -take 1] 10 (#$ . 9123)]) #@124 Makes a directory if not exists, and tries to do the same with the remaining components, recursively. (fn DIR REMAINING) (defalias 'omnisharp--mkdirp-item #[514 "\300!\204\n\301!\210\211\205\302\303\304\305\"@\"A\"\207" [f-directory-p f-mkdir omnisharp--mkdirp-item f-join -take 1] 8 (#$ . 9387)]) #@124 Tries to resolve project root for current buffer. nil if no project root directory was found. Uses projectile for the job. (defalias 'omnisharp--project-root #[0 "\301\302\303\304#\205\3051\306 \211\230?\205\211\2620\207\210\303\207" [default-directory require projectile nil noerror (error) projectile-project-root] 4 (#$ . 9702)]) #@119 Resolves a list of .sln file candidates and directories to be used for starting a server based on the current buffer. (defalias 'omnisharp--resolve-sln-candidates #[0 "\301\206\302!\303\304 \203+\305!\204+\306!\204#\307\310\311\"\"\262\312!\262\202\n\313!\262\211\203;\307C\"\262\207" [buffer-file-name file-name-directory "" nil omnisharp--project-root f-root-p file-remote-p append f-files #[257 "\301\302\303\304#)\207" [inhibit-changing-match-data "\\.sln$" nil t string-match] 8 "\n\n(fn FILENAME)"] f-parent reverse] 8 (#$ . 10050)]) #@51 Returns t if buffer is omnisharp metadata buffer. (defalias 'omnisharp--buffer-contains-metadata #[0 "\300\301!\206 \302\303\304 \"\207" [boundp omnisharp--metadata-source s-starts-with-p "*omnisharp-metadata:" buffer-name] 3 (#$ . 10623)]) #@77 Displays passed text using message function. (fn FORMAT-STRING &rest ARGS) (defalias 'omnisharp--message #[385 "\300\301B\"\207" [apply message] 6 (#$ . 10871)]) #@88 Displays passed text at point using popup-tip function. (fn FORMAT-STRING &rest ARGS) (defalias 'omnisharp--message-at-point #[385 "\300\301\302B\"!\207" [popup-tip apply format] 7 (#$ . 11042)]) (provide 'omnisharp-utils)