fix: partially revert OS detection changes
These changes snuck intoad6a3d0
, but have not been implemented yet, so some OS-specific functionality was orphaned. Amend:ad6a3d0f33
This commit is contained in:
parent
8b4f722fa3
commit
4c9df9bfc6
5 changed files with 15 additions and 15 deletions
|
@ -6,8 +6,8 @@
|
|||
;; REVIEW Use `with-memoization' when 27.x support is dropped
|
||||
(or (get 'doom-system-distro 'cached-value)
|
||||
(put 'doom-system-distro 'cached-value
|
||||
(cond ((featurep :os 'windows) 'windows)
|
||||
((featurep :os 'macos) 'macos)
|
||||
(cond (IS-WINDOWS 'windows)
|
||||
(IS-MAC 'macos)
|
||||
((and (file-exists-p "/etc/os-release")
|
||||
(with-temp-buffer
|
||||
(insert-file-contents "/etc/os-release")
|
||||
|
|
|
@ -74,8 +74,8 @@
|
|||
(apply fn args)))
|
||||
|
||||
;; REVIEW This is tremendously slow on macos and windows for some reason.
|
||||
(setq evil-mc-enable-bar-cursor (not (or (featurep :os 'macos)
|
||||
(featurep :os 'windows))))
|
||||
(setq evil-mc-enable-bar-cursor (not (or IS-MAC
|
||||
IS-WINDOWS)))
|
||||
|
||||
(after! smartparens
|
||||
;; Make evil-mc cooperate with smartparens better
|
||||
|
|
|
@ -17,7 +17,7 @@ This is ignored by ccls.")
|
|||
`((c-mode . nil)
|
||||
(c++-mode
|
||||
. ,(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
|
||||
;; std-objects to libraries linked with libstdc++ (e.g. if you
|
||||
;; 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
|
||||
(after! eglot
|
||||
(when (featurep :os 'macos)
|
||||
(when IS-MAC
|
||||
(add-to-list 'eglot-workspace-configuration
|
||||
`((:ccls . ((:clang . ,(list :extraArgs ["-isystem/Library/Developer/CommandLineTools/usr/include/c++/v1"
|
||||
"-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
|
||||
ccls-sem-highlight-method (if lsp-enable-semantic-highlighting
|
||||
ccls-sem-highlight-method))
|
||||
(when (or (featurep :os 'macos)
|
||||
(featurep :os 'linux))
|
||||
(when (or IS-MAC
|
||||
IS-LINUX)
|
||||
(setq ccls-initialization-options
|
||||
`(:index (:trackDependency 1
|
||||
:threads ,(max 1 (/ (doom-system-cpus) 2))))))
|
||||
(when (featurep :os 'macos)
|
||||
(when IS-MAC
|
||||
(setq ccls-initialization-options
|
||||
(append ccls-initialization-options
|
||||
`(:clang ,(list :extraArgs ["-isystem/Library/Developer/CommandLineTools/usr/include/c++/v1"
|
||||
|
|
|
@ -34,9 +34,9 @@ lua-language-server.")
|
|||
;; is a function is to dynamically change when/if `+lua-lsp-dir' does
|
||||
(list (or (executable-find "lua-language-server")
|
||||
(doom-path +lua-lsp-dir
|
||||
(cond ((featurep :os 'macos) "bin/macOS")
|
||||
((featurep :os 'linux) "bin/Linux")
|
||||
((featurep :os 'windows) "bin/Windows"))
|
||||
(cond (IS-MAC "bin/macOS")
|
||||
(IS-LINUX "bin/Linux")
|
||||
(IS-WINDOWS "bin/Windows"))
|
||||
"lua-language-server"))
|
||||
"-E" "-e" "LANG=en"
|
||||
(doom-path +lua-lsp-dir "main.lua")))
|
||||
|
|
|
@ -514,7 +514,7 @@ relative to `org-directory', unless it is an absolute path."
|
|||
:face (lambda (path)
|
||||
(if (or (file-remote-p path)
|
||||
;; filter out network shares on windows (slow)
|
||||
(and (featurep :os 'windows)
|
||||
(and IS-WINDOWS
|
||||
(string-prefix-p "\\\\" path))
|
||||
(file-exists-p path))
|
||||
'org-link
|
||||
|
@ -848,7 +848,7 @@ between the two."
|
|||
[C-return] #'+org/insert-item-below
|
||||
[C-S-return] #'+org/insert-item-above
|
||||
[C-M-return] #'org-insert-subheading
|
||||
(:when (featurep :os 'macos)
|
||||
(:when IS-MAC
|
||||
[s-return] #'+org/insert-item-below
|
||||
[s-S-return] #'+org/insert-item-above
|
||||
[s-M-return] #'org-insert-subheading)
|
||||
|
@ -1305,7 +1305,7 @@ between the two."
|
|||
"Advise `server-visit-files' to load `org-protocol' lazily."
|
||||
:around #'server-visit-files
|
||||
(if (not (cl-loop with protocol =
|
||||
(if (featurep :os 'windows)
|
||||
(if IS-WINDOWS
|
||||
;; On Windows, the file arguments for `emacsclient'
|
||||
;; get funnelled through `expand-file-path' by
|
||||
;; `server-process-filter'. This substitutes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue