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

feature: enabling partial buffer conversion #15

Merged
merged 2 commits into from
Jun 20, 2017

Conversation

mitermayer
Copy link
Member

  • bumping plugin prettier version
  • minor fix, removing dead code
  • enabling partial from visual selection

this fixes: #14

- bumping plugin prettier version
- minor fix, avoiding unecessary sync formattings when content has not
changed
- adding support for partial convertion when on visual selection
Copy link
Member Author

@mitermayer mitermayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nits

@@ -112,15 +120,24 @@ function! s:Handle_Parsing_Errors(out) abort
endif
endfunction

function! s:Apply_Prettier_Format(lines) abort
function! s:Has_Content_Changed(startLine, endLine, content) abort
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should be more consistent, all other methods are content, start, end

write
let s:prettier_job_running = 0
endif
endfunction

function! Prettier_Job_Error(channel, msg) abort
function! s:Prettier_Job_Error(channel, msg) abort
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are not using channel in here, we can modify this function signature and the lambda call to only send msg

@mitermayer mitermayer self-assigned this Jun 20, 2017
- removing trailing spaces
- removing extra param from error callback
- changing function signature with more consistent params
@mitermayer mitermayer merged commit b21e4f8 into master Jun 20, 2017
@mitermayer mitermayer deleted the feature/allow-partial-buffer-conversion branch July 4, 2017 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Partial formatting support
1 participant