-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Indent using spaces instead of tabs #76
Comments
I have the exact same issue using Vim 8. Is there any workaround? |
Well, my workaround is learning functional programming using haskell instead. For me it was about learning functional programming and I got haskell to work. I'll probably come back to this later. So for now: No, haven't found a workaround. |
Had the same issue. I use a Lua init file and it works nicely. Lua has its own namespace. You should try something like this: local set = vim.opt -- acts like the :set command in vimscript; set global, window and buffer settings
set.shiftwidth = 2 -- set shift width to 4 spaces.
set.tabstop = 2 -- set tab width to 4 columns.
set.expandtab = true -- Use space characters instead of tabs. |
Tabs are great! But yes, the PureScript compiler doesn't support it... yet. EditorConfig: https://editorconfig.org/ This are two great options for your projects to help as well. EditorConfig will make sure your whole team's editors are using the same white space across projects. Tidy will make sure your PureScript code is formatted similarly across the project and team--including configurable indentation. With the tab support being an open discussion and the popularity of Tidy in the community allowing users to configure the number of spaces, I don't think it's in the best interest for the Vim project here to be dictating these settings on users, and instead users can differ to other tools like the ones mentioned or changing their local vimrc. |
Maybe it would be a good idea to enable just |
Agreed that we should not enforce the shiftwidth and tabstop given tools like @FredTheDino is there an issue with setting up EditorConfig + editorconfig-vim while I get some confirmations? |
I haven't used editorconfig in the purescript projects I'm working on - it looks to work. I lean heavily on the formatter. I was mostly trying to be solve the problem practically. I have no problems with NeoVim 0.8.1 atleast. |
Workaround for vim: "{{ ~/.vimrc
function! PurescriptIndent()
setlocal expandtab
setlocal shiftwidth=2
setlocal tabstop=2
endfunction
au BufRead,BufNewFile *.purs call PurescriptIndent() |
Hey everyone,
I don't know if this is an issue particular to my neovim setup but my editor indents using tabs and these are not legal characters in purescript. So purescript-vim should probably make sure that tabs aren't used for indentation. I mostly c+p my vimrc/init.vim together so I'm not sure what the best way to implement this is, but it should probably just say:
Somewhere
The text was updated successfully, but these errors were encountered: