mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2025-03-04 17:49:59 +01:00
setup proper common lisp dev env
This commit is contained in:
parent
1e0508b410
commit
8e1d5f146b
6 changed files with 34 additions and 18 deletions
|
@ -12,9 +12,9 @@
|
|||
:racket
|
||||
:scheme
|
||||
:lua
|
||||
:lisp
|
||||
:python])
|
||||
(tset vim :g "conjure#filetype#rust" false)
|
||||
(tset vim :g "conjure#filetype#lisp" false)
|
||||
|
||||
;; This has custom handling for compat with LSP
|
||||
(tset vim :g "conjure#mapping#doc_word" false)
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
(local lspc (require :lspconfig))
|
||||
(local lsp-configs (require :lspconfig.configs))
|
||||
|
||||
(macro setup [conf args]
|
||||
(var args args)
|
||||
|
@ -9,6 +10,12 @@
|
|||
(tset args :capabilities `caps)
|
||||
`((. lspc ,conf :setup) ,args))
|
||||
|
||||
(tset lsp-configs :cl-lsp {:default_config {:cmd [:cl-lsp]
|
||||
:filetypes [:lisp]
|
||||
:root_dir lspc.util.find_git_ancestor
|
||||
:single_file_support true}
|
||||
:settings {}})
|
||||
|
||||
(var caps
|
||||
((. (require :cmp_nvim_lsp) :default_capabilities) (vim.lsp.protocol.make_client_capabilities)))
|
||||
|
||||
|
@ -25,6 +32,7 @@
|
|||
(fn disable-formatter [client _]
|
||||
(tset client :server_capabilities :documentFormattingRangeProvider false))
|
||||
|
||||
(setup :cl-lsp)
|
||||
(setup :clangd {:on_attach (fn [c b] (disable-formatter c b)
|
||||
(check-conjure c b))})
|
||||
|
||||
|
|
|
@ -18,6 +18,12 @@
|
|||
|
||||
(apply cmd "paru" "-S" "--needed" "--noconfirm" lsp-packages)
|
||||
|
||||
;; install OCaml LSP
|
||||
(when (find-executable-path "opam")
|
||||
(cmd "opam" "install" "--yes" "ocaml-lsp-server" "ocamlformat"))
|
||||
|
||||
;; Install CommonLisp LSP
|
||||
;; Also useful for CommonLisp: `ros install koji-kojiro/cl-repl`
|
||||
(when (find-executable-path "ros")
|
||||
(cmd "ros" "install" "lem-project/lem" "cxxxr/cl-lsp"))
|
||||
null)
|
||||
|
|
|
@ -2,17 +2,12 @@
|
|||
(require "../common.rkt")
|
||||
(provide run)
|
||||
|
||||
(define-logging mklink
|
||||
(λ (from to)
|
||||
(with-handlers ([exn:fail? (const #f)]) (delete-file to))
|
||||
(make-file-or-directory-link (normalize-path from) to)))
|
||||
|
||||
(define (run)
|
||||
(define-logging mklink
|
||||
(λ (from to)
|
||||
(with-handlers ([exn:fail? (const #f)]) (delete-file to))
|
||||
(make-file-or-directory-link (normalize-path from) to)))
|
||||
|
||||
(define-logging install-zig-script
|
||||
(λ (path)
|
||||
(parameterize ([current-directory path] [log-calls #f])
|
||||
(cmd "zig" "build" "-p" (output-bin-path) "-Doptimize=ReleaseFast"))))
|
||||
|
||||
;; Symlink interpreted scripts
|
||||
(mklink "scripts/map-touch-display.rkt" (build-path (output-bin-path) "bin" "map-touch-display"))
|
||||
(mklink "scripts/playvid.rkt" (build-path (output-bin-path) "bin" "playvid"))
|
||||
|
@ -23,10 +18,10 @@
|
|||
(mklink "scripts/withjava.sh" (build-path (output-bin-path) "bin" "withjava"))
|
||||
|
||||
;; Compile Zig scripts
|
||||
(install-zig-script "scripts/mzteinit")
|
||||
(install-zig-script "scripts/openbrowser")
|
||||
(install-zig-script "scripts/playtwitch")
|
||||
(install-zig-script "scripts/prompt")
|
||||
(install-zig-script "scripts/randomwallpaper")
|
||||
(install-zig-script "scripts/vinput")
|
||||
(install-zig "scripts/mzteinit")
|
||||
(install-zig "scripts/openbrowser")
|
||||
(install-zig "scripts/playtwitch")
|
||||
(install-zig "scripts/prompt")
|
||||
(install-zig "scripts/randomwallpaper")
|
||||
(install-zig "scripts/vinput")
|
||||
null)
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
(define (run)
|
||||
(define nvim-config-dir (build-path (find-system-path 'home-dir) ".config" "nvim"))
|
||||
(install-zig "mzte-nv")
|
||||
(rm nvim-config-dir)
|
||||
(copy "mzte-nv/conf" nvim-config-dir)
|
||||
(cmd "mzte-nv-compile" (path->string nvim-config-dir))
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
output-bin-path
|
||||
cmd
|
||||
rm
|
||||
copy)
|
||||
copy
|
||||
install-zig)
|
||||
|
||||
;; Whether to log calls or not
|
||||
(define log-calls (make-parameter #t))
|
||||
|
@ -29,3 +30,8 @@
|
|||
(define-logging cmd (λ (exe . args) (apply system* (find-executable-path exe) args)))
|
||||
(define-logging rm delete-directory/files)
|
||||
(define-logging copy copy-directory/files)
|
||||
|
||||
(define-logging install-zig
|
||||
(λ (path)
|
||||
(parameterize ([current-directory path] [log-calls #f])
|
||||
(cmd "zig" "build" "-p" (output-bin-path) "-Doptimize=ReleaseFast"))))
|
||||
|
|
Loading…
Add table
Reference in a new issue