;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\303\304\305\306\307DD\310\311\312\313\314\315\316& \210\303\317\305\306\320DD\321\311\312\313\314\315\322& \210\303\323\305\306\324DD\325\311\312\313\314\315\326& \207" [require dash lsp-mode custom-declare-variable lsp-dart-sdk-dir funcall function #[0 "\300\207" [nil] 1] "Path to the Dart SDK.\nIf nil, lsp-dart will attempt to find it from the PATH environment variable.\nWhen editing a Flutter project, the version of Dart included in the Flutter SDK\nis used in preference." :group lsp-dart :risky t :type (choice directory nil) lsp-dart-flutter-sdk-dir #[0 "\300\207" [nil] 1] "Path to the Flutter SDK.\nIf nil, Dart Code will attempt to find it from the project folder,\nFLUTTER_ROOT environment variable and the PATH environment variable." (choice directory nil) lsp-dart-flutter-executable #[0 "\300\207" [#1="flutter"] 1 #1#] "Flutter executable name.\nUseful if multiple Flutter installations are present." string] 10) (defvar lsp-dart--project-type-cache nil nil) (make-variable-buffer-local 'lsp-dart--project-type-cache) #@64 Update project type cache checking FLUTTER?. (fn FLUTTER\=\?) (defalias 'lsp-dart--set-project-type-cache #[257 "\211\203\301\207\302\207" [lsp-dart--project-type-cache flutter dart] 2 (#$ . 1162)]) #@53 Return non-nil if buffer is the flutter repository. (defalias 'lsp-dart--flutter-repo-p #[0 "\302 \"\211\205\303\304 \"!\205\305\304\306\"!\207" [default-directory lsp-dart-flutter-executable locate-dominating-file file-regular-p expand-file-name file-directory-p "cache/dart-sdk"] 5 (#$ . 1372)]) #@48 Return non-nil if buffer is a flutter project. (defalias 'lsp-dart-flutter-project-p #[0 "\203\301=\207\302 \211\205\303\304\"\262\211\205?\305\306\307\"r\211q\210\310\311\"\216\312\302 \211\2050\303\304\"\262!\210eb\210\313\314\315\307#*\262\262\206F\316 \317!\210\207" [lsp-dart--project-type-cache flutter lsp-dart-get-project-root expand-file-name "pubspec.yaml" generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] insert-file-contents re-search-forward "sdk *: *flutter" nil lsp-dart--flutter-repo-p lsp-dart--set-project-type-cache] 7 (#$ . 1683)]) #@50 Remove item with KEY from ALIST. (fn KEY ALIST) (defalias 'lsp-dart-remove-from-alist #[514 "\300\301\"\"\207" [delq assoc] 6 (#$ . 2321)]) #@67 Assoc VALUE to LIST if PREDICATE is t. (fn LIST PREDICATE VALUE) (defalias 'lsp-dart-assoc-if #[771 "\203\n\300C\"\207\207" [append] 6 (#$ . 2471)]) #@167 Return the Dart SDK path. Check for PATH environment variable. When editing a Flutter project, the version of Dart included in the Flutter SDK is used in preference. (defalias 'lsp-dart-get-sdk-dir #[0 "\2060\301 \203\302\303\304 \"\2060\305\306!\211\205\307!\262\211\205%\310\311\"\262\211\205.\307!\262\207" [lsp-dart-sdk-dir lsp-dart-flutter-project-p expand-file-name "bin/cache/dart-sdk/" lsp-dart-get-flutter-sdk-dir executable-find "dart" file-truename locate-dominating-file "bin"] 4 (#$ . 2633)]) #@139 Return the Flutter SDK path. Check for `lsp-dart-flutter-sdk-dir` then flutter executable on PATH then FLUTTER_ROOT environment variable. (defalias 'lsp-dart-get-flutter-sdk-dir #[0 "\206)\302 !\211\205\303!\262\211\205\304\305\"\262\211\205!\303!\262\206)\306\307!\207" [lsp-dart-flutter-sdk-dir lsp-dart-flutter-executable executable-find file-truename locate-dominating-file "bin" getenv "FLUTTER_ROOT"] 4 (#$ . 3161)]) #@52 Return the pub executable path from Dart SDK path. (defalias 'lsp-dart-pub-command #[0 "\301=\203\f\302\303\304 \"\210\302\305\304 \"\207" [system-type windows-nt expand-file-name "bin/pub.bat" lsp-dart-get-sdk-dir "bin/pub"] 3 (#$ . 3604)]) #@61 Return the pub snapshot executable path from Dart SDK path. (defalias 'lsp-dart-pub-snapshot-command #[0 "\300\301\302 \"\207" [expand-file-name "bin/snapshots/pub.dart.snapshot" lsp-dart-get-sdk-dir] 3 (#$ . 3854)]) #@47 Return the dart executable from Dart SDK dir. (defalias 'lsp-dart-dart-command #[0 "\301=\203\n\302\202 \303\304\305 \"\306!\203\207\307\310\"\207" [system-type windows-nt "bin/dart.exe" "bin/dart" expand-file-name lsp-dart-get-sdk-dir file-exists-p lsp-dart-log "Dart command not found in path '%s'"] 5 (#$ . 4077)]) #@53 Return the flutter executable from Flutter SDK dir. (defalias 'lsp-dart-flutter-command #[0 "\302=\203\n\303\202 \304 P\305\306 \"\307!\203\207\310\311\"\207" [system-type lsp-dart-flutter-executable windows-nt "bin/flutter.bat" "bin/" expand-file-name lsp-dart-get-flutter-sdk-dir file-exists-p lsp-dart-log "Flutter command not found in path '%s'"] 5 (#$ . 4409)]) #@42 Return the dart or flutter project root. (defalias 'lsp-dart-get-project-root #[0 "\211\205 \301\302\"\262\211\205\303!\207" [default-directory locate-dominating-file "pubspec.yaml" file-truename] 4 (#$ . 4790)]) #@48 Return the dart or flutter project entrypoint. (defalias 'lsp-dart-get-project-entrypoint #[0 "\300 \301\302\"\301\303\"\304!\203\207\304!\205\211\207" [lsp-dart-get-project-root expand-file-name "lib/main.dart" "bin/main.dart" file-exists-p] 5 (#$ . 5016)]) #@65 Execute BODY with cwd set to the project root. (fn &rest BODY) (defalias 'lsp-dart-from-project-root '(macro . #[128 "\300\301\302\303\300\304BB\305BBBE\207" [let ((project-root (lsp-dart-get-project-root))) if project-root ((default-directory project-root)) ((error "Project not found (pubspec.yaml not found)"))] 8 (#$ . 5290)])) #@42 Define KEY with ACTION. (fn KEY ACTION) (defalias 'lsp-dart-define-key #[514 "\205\302 \303\304Q!#\207" [lsp-keymap-prefix lsp-mode-map define-key kbd " D "] 8 (#$ . 5631)]) #@59 Log MSG with ARGS and custom prefix. (fn MSG &rest ARGS) (defalias 'lsp-dart-log #[385 "\300\301\302\303#\304\305\306Q#\207" [propertize "[LSP Dart]" face font-lock-keyword-face apply message " "] 8 (#$ . 5819)]) #@70 Log with custom PREFIX the MSG and ARGS. (fn PREFIX MSG &rest ARGS) (defalias 'lsp-dart-custom-log #[642 "\300\301\302\303#\300\302\304#\305\306\307\307 \260#\207" [propertize "[LSP Dart]" face font-lock-keyword-face font-lock-function-name-face apply message " "] 12 (#$ . 6043)]) #@62 Set MESSAGE on lsp WORKSPACE status. (fn MESSAGE WORKSPACE) (defalias 'lsp-dart-workspace-status #[514 "\203\300\301\302\303\304#\305Q\"\207\300\306\"\207" [lsp-workspace-status propertize "[LSP Dart]" face font-lock-keyword-face " " nil] 7 (#$ . 6338)]) #@47 Retrieve the dart version from shell command. (defalias 'lsp-dart-get-full-dart-version #[0 "\300\301 \302P!\207" [shell-command-to-string lsp-dart-dart-command " --version"] 3 (#$ . 6606)]) #@50 Retrieve the Flutter version from shell command. (defalias 'lsp-dart-get-full-flutter-version #[0 "\300\301 \302P!\207" [shell-command-to-string lsp-dart-flutter-command " --version"] 3 (#$ . 6803)]) #@47 Retrieve the dart version from shell command. (defalias 'lsp-dart-get-dart-version #[0 "\300\301\302 !8\207" [3 split-string lsp-dart-get-full-dart-version] 3 (#$ . 7009)]) #@50 Retrieve the Flutter version from shell command. (defalias 'lsp-dart-get-flutter-version #[0 "\300\301 !A@\207" [split-string lsp-dart-get-full-flutter-version] 2 (#$ . 7188)]) #@67 Transform VERSION into a comparable version number. (fn VERSION) (defalias 'lsp-dart-version->number #[257 "\211\300\301\302\303\304%\300\305\306\303\304%\300\307\302\303\304%\207" [replace-regexp-in-string "flutter-[[:word:]]+" "0" nil literal "-" "." "[[:alpha:]]+"] 10 (#$ . 7371)]) #@71 Return non-nil if Dart SDK version is at least VERSION. (fn VERSION) (defalias 'lsp-dart-version-at-least-p #[257 "\300 \301\302!\302!\"\207" [lsp-dart-get-dart-version version<= lsp-dart-version->number] 6 (#$ . 7667)]) #@83 Assert TEST-FORM return non-nil otherwise prints MESSAGE. (fn TEST-FORM MESSAGE) (defalias 'lsp-dart-assert '(macro . #[514 "\300\301D\302\303EE\207" [when not error "Assertion failed: %s"] 7 (#$ . 7897)])) #@55 Assert dart sdk min version is VERSION. (fn VERSION) (defalias 'lsp-dart-assert-sdk-min-version #[257 "\300!?\205 \301\302\303\"\207" [lsp-dart-version-at-least-p error "Assertion failed: %s" "Feature not supported before dart SDK %s"] 4 (#$ . 8113)]) (provide 'lsp-dart-utils)