Comments (6)
hey @steveaft,
I think this is a configuration problem, not a bug.
This is my personal tab configuration for Lighttable:
[:editor :lt.objs.editor/tab-settings false 4 2]
You should have something similar in your user.behaviors
, if you don't know what that is simply open the command panel, type user behavior
and open it. You should be able to configure your tab/spaces whichever way you want. The config that I showed above says to use spaces instead of tabs (false), and indents everything with 2 spaces. tabs are configured to be 4 spaces.
hope that helps
from clojure.
I agree it is probably some configuration issue but can't figure out what.
When I have some time to look again I'll probably add logging statements to the codemirror files and the lighttable ones
I have my tabs set to false 4 4, for :editor, but I tried yours with same effect. Here is what I have:
[:editor :lt.objs.editor/tab-settings false 4 4]
[:editor.clojure :lt.objs.editor/tab-settings false 2 2]
[:editor.clojurescript :lt.objs.editor/tab-settings false 2 2]
But if I select a chunk of code and hit shift-tab (smart indent) it doesn't seem to do the two-space indenting (nor if I split a line with a carriage return)
So if I have
(defn x []
(log "foo"))
and I smart indent, it ends up as
(defn x []
(log "foo"))
If I manually delete the whitespace in front of (log "foo"), then put my cursor at the start of the line and hit tab, it indents 2 spaces
If I look at the codemirror clojure file it seems like it should end up knowing my tab is 2 spaces but I get 4 on the smart indent.
from clojure.
mmm weird,
I can't reproduce this behavior in my LT. I used your configuration and everything works fine.
Could you tell me your system and LT specifications?
And as a remark: did you manually make the shift + tab keybinding in your LT? because I don't have that keybinding, so do it through the command panel and it works fine with the function and configuration that you gave me. Could you try that please?
PS: I get a similar behavior only when working outside of clojure(script) files, for example, if I try shift + tab in a behaviors file, it inserts two extra spaces at the beginning of the line. But that is a correct behavior since your configuration is 4 4 for any editor that is not clojure(script). If I put it in 2 2 then everything works as expected.
from clojure.
Hmm I don't have shift-tab set to anything, it just seems to always have the same effect as running the smart indent command. I also installed keymapper plugin, and don't see shift-tab set to anything.
Running smart-indent through the command panel has the same effect.
If I take a cljs file, set the syntax to something else like "C++", then I do smart-indent, it indents quite differently (1 space indents in that case), so it seems that somehow it is the clojure plugin.
I'm running on a mac, latest os, all updates installed.
lighttable 0.8.1
from clojure.
@steveaft You mentioned you have the Keymapper plugin installed. What other plugins do you have installed? Would you try reproducing this with a clean install without any other plugins (other than the defaults) installed? See this issue for details on uninstalling everything:
from clojure.
I did try uninstalling plugins but didn't do a complete purge. I'll give that a try
from clojure.
Related Issues (20)
- Automatic recompilation and load of file-based namespace HOT 1
- Explicit error if building a cljs plugin failed
- dosync is not indented like do HOT 3
- Evaling a set form throws a "... java.lang.Long cannot be cast to java.lang.Integer" exception HOT 9
- Nothing is displayed when evaling a form that uses the quote reader macro HOT 1
- multiple REPL connections on new lighttable version HOT 9
- inline plot support HOT 7
- Eval into a cljs React Native project
- better error messages HOT 21
- Tagged literals break Instarepl HOT 1
- Inline evaluation (Ctrl+Enter) fails on custom tagged literals.
- Instarepl throws javascript error HOT 1
- add new functions' names to codemirror HOT 3
- consider making inline results with pprint HOT 1
- Nothing is displayed when eval-ing simple expressions
- lighttable.nrepl.handler Does not conform to spec HOT 5
- Eval clojure in non supported File-types
- Add Proper Support for Boot
- java.net.MalformedURLException: unknown protocol: c
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 clojure.