Skip to content

Commit da9a5b2

Browse files
authored
Merge pull request #4 from jeongsoolee09/main
Add a guide for the `straight.el` users
2 parents 7b9802b + dcf6833 commit da9a5b2

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,32 @@ Alternatively, you can clone this repository and place it into your emacs `load-
8383
(setq codeql-search-paths '("./"))
8484
```
8585

86+
Users of `straight.el` can use the below `use-package` declaration instead:
87+
88+
```elisp
89+
(use-package emacs-codeql
90+
:straight
91+
(emacs-codeql :type git
92+
:host github
93+
:repo "anticomputer/emacs-codeql"
94+
:branch "main")
95+
:after tree-sitter-langs
96+
:demand
97+
:init
98+
(setq codeql-transient-binding "C-c q")
99+
(setq codeql-configure-eglot-lsp t)
100+
(setq codeql-configure-projectile t)
101+
:config
102+
;; you should configure your standard search paths through a ~/.config/codeql/config entry
103+
;; e.g. "--search-path /full/path/codeql:/full/path/codeql-go"
104+
;; see: https://codeql.github.com/docs/codeql-cli/specifying-command-options-in-a-codeql-configuration-file/
105+
;; this option is here to provide you with load/search precedence control
106+
;; these paths will have precedence over the config file search paths
107+
(setq codeql-search-paths '("./")))
108+
```
109+
110+
If you are using [`straight.el`](https://github.com/radian-software/straight.el), you will likely face an issue preparing the tree-sitter-lang artifact, as the path from which `emacs-codeql` copies the appropriate artifact to the `tree-sitter-langs--bin-dir` may not be correct. In this case, you can easily workaround this issue by simply manually copying the `$HOME/.emacs.d/straight/repos/emacs-codeql//bin/{your-system-type}/{your-arch}/ql.*`to the directory that `tree-sitter-langs--bin-dir` points to.
111+
86112
### Getting Started: the recommended way
87113

88114
The quickest way into painfree CodeQL development is to use the CodeQL starter workspace and the gh cli extension to manage your toolchain dependencies. To get started:

0 commit comments

Comments
 (0)