Skip to content

Commit

Permalink
Add lsp (metabase#15181)
Browse files Browse the repository at this point in the history
* Add lsp and config

```emacs-lisp
  (use-package lsp-mode
    :ensure t
    :hook ((clojure-mode . lsp)
           (clojurec-mode . lsp)
           (clojurescript-mode . lsp))
    :config
    (setq lsp-enable-indentation nil)
    (setq lsp-enable-file-watchers nil) ;; annoying and i can't specify paths
    ;; add paths to your local installation of project mgmt tools, like lein
    (dolist (m '(clojure-mode
                 clojurec-mode
                 clojurescript-mode
                 clojurex-mode))
       (add-to-list 'lsp-language-id-configuration `(,m . "clojure"))))
```

* Add socket repl support to project.clj (also include reveal)

* Configure lsp so that enterprise is on the classpath
  • Loading branch information
dpsutton authored Mar 16, 2021
1 parent 6b8ddc8 commit 3edc7d0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,7 @@ dev/src/dev/nocommit/
**/cypress_sample_dataset.json
/frontend/src/cljs
.shadow-cljs

# lsp: ignore all but the config file
.lsp/*
!.lsp/config.edn
4 changes: 4 additions & 0 deletions .lsp/config.edn
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{:keep-require-at-start? true
:show-docs-arity-on-same-line? true
:project-specs [{:project-path "project.clj"
:classpath-cmd ["lein" "with-profile" "+ee" "classpath"]}]}
6 changes: 6 additions & 0 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,12 @@
{:source-paths ["enterprise/backend/src"]
:test-paths ["enterprise/backend/test"]}

:socket
{:dependencies
[[vlaaad/reveal "1.3.196"]]
:jvm-opts
["-Dclojure.server.repl={:port 5555 :accept clojure.core.server/repl}"]}

:dev
{:source-paths ["dev/src" "local/src"]
:test-paths ["test" "backend/mbql/test" "shared/test"]
Expand Down

0 comments on commit 3edc7d0

Please sign in to comment.