fix: partially revert OS detection changes

These changes snuck into ad6a3d0, but have not been implemented yet, so
some OS-specific functionality was orphaned.

Amend: ad6a3d0f33
This commit is contained in:
Henrik Lissner 2022-08-18 17:06:42 +02:00
parent 8b4f722fa3
commit 4c9df9bfc6
No known key found for this signature in database
GPG key ID: B60957CA074D39A3
5 changed files with 15 additions and 15 deletions

View file

@ -6,8 +6,8 @@
;; REVIEW Use `with-memoization' when 27.x support is dropped ;; REVIEW Use `with-memoization' when 27.x support is dropped
(or (get 'doom-system-distro 'cached-value) (or (get 'doom-system-distro 'cached-value)
(put 'doom-system-distro 'cached-value (put 'doom-system-distro 'cached-value
(cond ((featurep :os 'windows) 'windows) (cond (IS-WINDOWS 'windows)
((featurep :os 'macos) 'macos) (IS-MAC 'macos)
((and (file-exists-p "/etc/os-release") ((and (file-exists-p "/etc/os-release")
(with-temp-buffer (with-temp-buffer
(insert-file-contents "/etc/os-release") (insert-file-contents "/etc/os-release")

View file

@ -74,8 +74,8 @@
(apply fn args))) (apply fn args)))
;; REVIEW This is tremendously slow on macos and windows for some reason. ;; REVIEW This is tremendously slow on macos and windows for some reason.
(setq evil-mc-enable-bar-cursor (not (or (featurep :os 'macos) (setq evil-mc-enable-bar-cursor (not (or IS-MAC
(featurep :os 'windows)))) IS-WINDOWS)))
(after! smartparens (after! smartparens
;; Make evil-mc cooperate with smartparens better ;; Make evil-mc cooperate with smartparens better

View file

@ -17,7 +17,7 @@ This is ignored by ccls.")
`((c-mode . nil) `((c-mode . nil)
(c++-mode (c++-mode
. ,(list "-std=c++1z" ; use C++17 draft by default . ,(list "-std=c++1z" ; use C++17 draft by default
(when (featurep :os 'macos) (when IS-MAC
;; NOTE beware: you'll get abi-inconsistencies when passing ;; NOTE beware: you'll get abi-inconsistencies when passing
;; std-objects to libraries linked with libstdc++ (e.g. if you ;; std-objects to libraries linked with libstdc++ (e.g. if you
;; use boost which wasn't compiled with libc++) ;; use boost which wasn't compiled with libc++)
@ -270,7 +270,7 @@ If rtags or rdm aren't available, fail silently instead of throwing a breaking e
;; NOTE : This setting is untested yet ;; NOTE : This setting is untested yet
(after! eglot (after! eglot
(when (featurep :os 'macos) (when IS-MAC
(add-to-list 'eglot-workspace-configuration (add-to-list 'eglot-workspace-configuration
`((:ccls . ((:clang . ,(list :extraArgs ["-isystem/Library/Developer/CommandLineTools/usr/include/c++/v1" `((:ccls . ((:clang . ,(list :extraArgs ["-isystem/Library/Developer/CommandLineTools/usr/include/c++/v1"
"-isystem/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include" "-isystem/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include"
@ -297,12 +297,12 @@ If rtags or rdm aren't available, fail silently instead of throwing a breaking e
(setq-hook! 'lsp-configure-hook (setq-hook! 'lsp-configure-hook
ccls-sem-highlight-method (if lsp-enable-semantic-highlighting ccls-sem-highlight-method (if lsp-enable-semantic-highlighting
ccls-sem-highlight-method)) ccls-sem-highlight-method))
(when (or (featurep :os 'macos) (when (or IS-MAC
(featurep :os 'linux)) IS-LINUX)
(setq ccls-initialization-options (setq ccls-initialization-options
`(:index (:trackDependency 1 `(:index (:trackDependency 1
:threads ,(max 1 (/ (doom-system-cpus) 2)))))) :threads ,(max 1 (/ (doom-system-cpus) 2))))))
(when (featurep :os 'macos) (when IS-MAC
(setq ccls-initialization-options (setq ccls-initialization-options
(append ccls-initialization-options (append ccls-initialization-options
`(:clang ,(list :extraArgs ["-isystem/Library/Developer/CommandLineTools/usr/include/c++/v1" `(:clang ,(list :extraArgs ["-isystem/Library/Developer/CommandLineTools/usr/include/c++/v1"

View file

@ -34,9 +34,9 @@ lua-language-server.")
;; is a function is to dynamically change when/if `+lua-lsp-dir' does ;; is a function is to dynamically change when/if `+lua-lsp-dir' does
(list (or (executable-find "lua-language-server") (list (or (executable-find "lua-language-server")
(doom-path +lua-lsp-dir (doom-path +lua-lsp-dir
(cond ((featurep :os 'macos) "bin/macOS") (cond (IS-MAC "bin/macOS")
((featurep :os 'linux) "bin/Linux") (IS-LINUX "bin/Linux")
((featurep :os 'windows) "bin/Windows")) (IS-WINDOWS "bin/Windows"))
"lua-language-server")) "lua-language-server"))
"-E" "-e" "LANG=en" "-E" "-e" "LANG=en"
(doom-path +lua-lsp-dir "main.lua"))) (doom-path +lua-lsp-dir "main.lua")))

View file

@ -514,7 +514,7 @@ relative to `org-directory', unless it is an absolute path."
:face (lambda (path) :face (lambda (path)
(if (or (file-remote-p path) (if (or (file-remote-p path)
;; filter out network shares on windows (slow) ;; filter out network shares on windows (slow)
(and (featurep :os 'windows) (and IS-WINDOWS
(string-prefix-p "\\\\" path)) (string-prefix-p "\\\\" path))
(file-exists-p path)) (file-exists-p path))
'org-link 'org-link
@ -848,7 +848,7 @@ between the two."
[C-return] #'+org/insert-item-below [C-return] #'+org/insert-item-below
[C-S-return] #'+org/insert-item-above [C-S-return] #'+org/insert-item-above
[C-M-return] #'org-insert-subheading [C-M-return] #'org-insert-subheading
(:when (featurep :os 'macos) (:when IS-MAC
[s-return] #'+org/insert-item-below [s-return] #'+org/insert-item-below
[s-S-return] #'+org/insert-item-above [s-S-return] #'+org/insert-item-above
[s-M-return] #'org-insert-subheading) [s-M-return] #'org-insert-subheading)
@ -1305,7 +1305,7 @@ between the two."
"Advise `server-visit-files' to load `org-protocol' lazily." "Advise `server-visit-files' to load `org-protocol' lazily."
:around #'server-visit-files :around #'server-visit-files
(if (not (cl-loop with protocol = (if (not (cl-loop with protocol =
(if (featurep :os 'windows) (if IS-WINDOWS
;; On Windows, the file arguments for `emacsclient' ;; On Windows, the file arguments for `emacsclient'
;; get funnelled through `expand-file-path' by ;; get funnelled through `expand-file-path' by
;; `server-process-filter'. This substitutes ;; `server-process-filter'. This substitutes