I am using pine-script-mode for TradingView Pine script.
When I follow https://emacs.stackexchange.com/a/17565/18414 I have applied:
(defun my-custom-settings-fn ()
(setq indent-tabs-mode nil)
(setq tab-width 4)
(setq indent-line-function 'insert-tab))
(add-hook 'pine-script-mode-hook 'my-custom-settings-fn)
Hence still TABs make 3 space inden. How can I force pine-script-mode
to do indention as 4 space?
I have in the following code when cursor is at the beginning of SLEEP_BAR := 20
and tab applied 3 space is added :
example.pine file:
if timeframe.isseconds
SLEEP_BAR := 20 // when I applied TAB at the beginning of the line 3 spaces added
- In the
example.pine
buffer,C-h v tab-width
says 4
here
exactly? At the beginning of the line, four spaces are added; if at the end of the line, two spaces are added because that's how many are needed to bring you to the next "tab stop". You have to describe the problem more precisely.example.pine
buffer, what doesC-h v tab-width
say?tab-width
says 4At the beginning of the line
, but no matter what 3 spaces added instead of 4 :-(indent-line-function
? If you're getting 3 spaces instead of 4, it seems likeindent-relative
is still being used instead ofinsert-tab
.