Skip to content
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

line after type declaration begins indented #51

Open
matthewleon opened this issue Oct 26, 2017 · 2 comments
Open

line after type declaration begins indented #51

matthewleon opened this issue Oct 26, 2017 · 2 comments

Comments

@matthewleon
Copy link

for example

x :: Number

The line immediately after will begin indented. This is undesirable to me.

Removing the setlocal indentexpr=GetPurescriptIndent() line from the indentation file stops this, but of course it stops all indentation.

I can't tell if this is something unique to my vim configuration, or if this happens to everyone. I'd appreciate any advice you can give for further debugging.

@matthewleon
Copy link
Author

I've removed all plugins except this one, and the behavior continues. This is in Vim 8.

@Baudin999
Copy link

I can confirm this behaviour in vim 8. My vim configuration is:

call plug#begin('~/.vim/plugged')

Plug 'scrooloose/nerdtree'
Plug 'kien/ctrlp.vim'
Plug 'bling/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'tpope/vim-fugitive'
Plug 'valloric/youcompleteme'
Plug 'pangloss/vim-javascript'
Plug 'mxw/vim-jsx'
Plug 'flazz/vim-colorschemes'
Plug 'nathanaelkane/vim-indent-guides'
Plug 'scrooloose/syntastic'
Plug 'bling/vim-bufferline'
Plug 'tpope/vim-surround'
Plug 'elmcast/elm-vim'
Plug 'purescript-contrib/purescript-vim'

call plug#end()

" Airline configuration
let g:airline#extensions#tabline#enabled = 1


" Syntax highlighting
colo apprentice
syntax enable
let g:jsx_ext_required = 0
let g:javascript_plugin_jsdoc = 1

" Syntax Checking
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_javascript_eslint_exe='$(npm bin)/eslint'
let g:syntastic_javascript_checkers=['eslint']

" Spaces and tabs
set tabstop=4		" number of spaces a tab counts for
set softtabstop=4	" number of spaces a tab counts for when editing
set expandtab 		" tabs are spaces
set shiftwidth=4
set smarttab

" UI config
set number 		" show line numbers
set showcmd		" show the last command entered
filetype plugin indent on	" filetype detection and allows loading of language specific indentation
set wildmenu		" vim autocompletes things like filenames
set lazyredraw
set showmatch


" searching
set incsearch		" search as characters are entered
set hlsearch		" highlight matches

" NERDTree keymappings
nnoremap <silent> <F2> :NERDTreeFind<CR>
noremap <F3> :NERDTreeToggle<CR>
map <F3> :NERDTreeToggle<CR>
map <F2> :NERDTreeFind<CR>



" CtrlP settings
let g:ctrlp_match_window = 'bottom,order:ttb'
let g:ctrlp_switch_buffer = 0
let g:ctrlp_working_path_mode = 0
let g:ctrlp_custom_ignore = 'node_modules\|DS_Store\|git|elm-stuff\'
let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlP'



" Set the mouse to allow scrolling
set mouse=a
set encoding=utf-8
set hidden
set wildchar=<Tab> wildmenu wildmode=full
set wrap!

nnoremap <s-right> :bn<CR>
nnoremap <s-left> :bp<CR>
nnoremap <F5> :buffers<CR>:buffer<Space>

" autoformat on save
augroup autoindent
    au!
    autocmd BufWritePre * :normal migg=G`i
augroup End

" Save sessions in vim
nnoremap <S-F8> :mksession! ~/.vim/vim_session <cr> " Quick write session with F2
nnoremap <F8> :source ~/.vim/vim_session <cr>     " And load session with F3

redxaxder added a commit to redxaxder/purescript-vim that referenced this issue Jul 5, 2018
redxaxder added a commit to redxaxder/purescript-vim that referenced this issue Jul 5, 2018
If we're on the line following a type annotation,
and our line doesn't start with dots or arrows,
and the previous line isn't an instance declaration,
then indentation level is 0.
redxaxder added a commit to redxaxder/purescript-vim that referenced this issue Jul 5, 2018
If we're on the line following a type annotation,
and our line doesn't start with dots or arrows,
and the previous line isn't an instance declaration,
then indentation level is 0.
coot pushed a commit that referenced this issue Jul 5, 2018
If we're on the line following a type annotation,
and our line doesn't start with dots or arrows,
and the previous line isn't an instance declaration,
then indentation level is 0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants