Comments (3)
Hi,
I have no experience with Emacs but with Vim I'm using the following options:
" Regexpes matching the start of symbol
let g:clojure_fuzzy_indent_patterns=['^GET', '^POST', '^PUT', '^DELETE', '^ANY', '^HEAD', '^PATCH', '^OPTIONS', '^def']
" Compojure-api
autocmd FileType clojure setlocal lispwords+=context,swaggered
It should be possible to define equivalent options in Emacs. Clojure-mode readme offers some pointers.
from compojure-api.
I have currently (might be a bit out of date):
(define-clojure-indent
; compojure
(defroutes 'defun)
(GET 2)
(POST 2)
(PUT 2)
(DELETE 2)
(HEAD 2)
(ANY 2)
(context 2)
; midje
(fact 2)
; metosin
(defapi 'defun)
(swaggered 'defun)
(swagger-docs 2)
(GET* 2)
(POST* 2)
(PUT* 2)
(DELETE* 2)
(HEAD* 2)
(ANY* 2))
Reference: https://github.com/weavejester/compojure/wiki/Emacs-indentation
from compojure-api.
(require 'clojure-mode)
(define-clojure-indent
; compojure
(defroutes 'defun)
(GET 2)
(POST 2)
(PUT 2)
(DELETE 2)
(HEAD 2)
(ANY 2)
(context 2)
; midje
(fact 2)
; metosin
(defapi 'defun)
(swagger-ui 'defun)
(swagger-docs 'defun)
(swaggered 'defun)
(GET* 2)
(POST* 2)
(PUT* 2)
(DELETE* 2)
(HEAD* 2)
(ANY* 2))
I try to use the above code, the result is good.
thank you. 👍
from compojure-api.
Related Issues (20)
- spec coercion to int HOT 1
- OpenAPI? HOT 5
- Add {:coercion :select-schema} option
- muuntaja encoder modifying swagger.json output HOT 1
- Vulnerability issue in dependent lib
- Missing security and deprecated meta
- Memory use rises with requests HOT 3
- Can't get Swagger UI to provide interface for arbitrary query params HOT 2
- fix broken url link in docs
- Clj-kondo linting issue HOT 2
- Consider bumping to Compojure 1.7.0 or Compojure 1.6.3
- Mixing compojure.api.sweet/defapi and compojure.core/defroutes
- How do I specify an optional field when accepting multipart-params for a request?
- Compojure 2.x should be backwards compatible with 1.x HOT 3
- Automatically push `context` parameters into endpoints when safe HOT 3
- Calculate coercers/schemas outside contexts when not dependent on request
- Pull out static parts of an otherwise-dynamic context
- Compile to non-linear routing strategies
- Immutable `restructure` interface
- Potential memory leak
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from compojure-api.