Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

doom indentation #226

Closed
molleweide opened this issue Nov 5, 2021 · 5 comments
Closed

doom indentation #226

molleweide opened this issue Nov 5, 2021 · 5 comments
Labels
question Further information is requested scope: enhancement New feature or request

Comments

@molleweide
Copy link
Contributor

I have not changed the indenation in doom_config.lua and when I run the built in
visual mode indent with = it reindents all the files in core. Is this a problem
if I want to submit a PR?

@NTBBloodbath NTBBloodbath added the question Further information is requested label Nov 6, 2021
@NTBBloodbath
Copy link
Collaborator

Hi, this is not a problem, we have a CI to automatically format the source code according to our coding style. However it would be great to avoid having the format source code commits lol.

Let's leave this open and use modeline comments to hardcode the doom files indentation, you can do it it you want to. Neovim reads the comments that starts with vim: and reads the options from it, e.g.

-- vim: sw=2:ts=2=sts=2

This sets the file indentation to 2 (shiftwidth, tabstop and softtabstop) when opening it, afaik this comment can be at top or bottom of the file but let's add them at bottom 🤔

@molleweide
Copy link
Contributor Author

molleweide commented Nov 16, 2021

I stumbled upon another indentation issue.
I am learning how to write a makefile but when I put makefile into doom nvim file. Then running Make complains
about about separators and indenation.

I created this user aucmd. Is there anything I should add to it because doom Make still complains

    autocmds = {
    	-- :autocmd FileType make set noexpandtab
    	makefile = {
    		{ 'FileType', 'make', 'set noexpandtab'},
    	}
    },

@molleweide
Copy link
Contributor Author

molleweide commented Nov 16, 2021

hmm, it worked when I manually redid all of the indents in my makefile.

okay, so when I copy paste makefile code from github into my local file, then it doesn't reindent properly, but if I '<<' everything into column 0 and then reindent file. then it indents correctly.

@molleweide
Copy link
Contributor Author

another thing that I can mention also is that bash is not being indented correctly for me.
sometimes it works and sometimes does't. I am going to post an example.

@NTBBloodbath NTBBloodbath added the scope: enhancement New feature or request label Nov 16, 2021
@NTBBloodbath NTBBloodbath changed the title doom indenation doom indentation Dec 20, 2021
@connorgmeehan
Copy link
Collaborator

Closed due to inactivity. Made a new issue for general issues with indenter here #364

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested scope: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants