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

Dispatch textDocument/didChange after rename (2) #4049

Merged

Conversation

jeremija
Copy link
Contributor

@jeremija jeremija commented Feb 2, 2022

Opening a new PR because #3783 was closed and we cannot reopen it.

Fixes #3343, #3642, #3781.

Video example:

Rename example

Previously whenever we renamed a symbol that was referenced from other
files we'd just edit those files in the background, and the LSP wouldn't
know about these changes. If we tried to rename the same symbol again,
the renaming would fail. In some scenarios, the operation would just be
wrong. Here is an attempt to fix this issue.

I also noticed another bug when using Go with `gopls` LSP and the `gofmt`
fixer. Whenever the file was saved, the `gofmt` would run and reformat
the file. But it seems there was some kind of a race condition so I
disabled saving for now, and all of the modified files will be unsaved,
so the user should call `:wa` to save them. I personally like this even
better because I can inspect exactly what changes happened, and I
instantly see them in the other opened buffers, which was previously not
the case.

Fixes dense-analysis#3343, dense-analysis#3642, dense-analysis#3781.
@jeremija jeremija changed the title Jeremija/rename multiple times Dispatch textDocument/didChange after rename (2) Feb 2, 2022
liskin
liskin previously approved these changes Feb 2, 2022
Copy link
Contributor

@liskin liskin left a comment

Choose a reason for hiding this comment

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

I can't recall what changes I wanted to make to the tests, and reading the code again now it looks all right. So I just added some final nitpicks that I spotted now and didn't notice before, but overall it's probably good.

(Oh and I just noticed that python-lsp-server can do cross-file renames, so I could probably switch to this branch and try it. Can't promise today, though.)

@@ -35,19 +35,16 @@ Before:
set fileformats=unix

" two files, one accessed through a buffer, the other using write/readfile only
Copy link
Contributor

Choose a reason for hiding this comment

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

Outdated comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, removed!

AssertEqual [2, 2], getpos('.')[1:2]

# ====C====
Execute(Cursor column will move to the change end when cursor between start/end):
let g:test.changes = g:test.create_change(2, 3, 2, 8, 'value2')

for r in range(3, 8)
" make tests at the end work
let g:notified_changes = []
Copy link
Contributor

Choose a reason for hiding this comment

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

It might be better to assert the contents of g:notified_changes explicitly/deliberately in some tests (where we test for the notification) rather than to pollute most tests with workarounds for an assertion in the test teardown, I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right, added more and better assertions and removed these resets.

@bogdan
Copy link

bogdan commented Feb 2, 2022

The issue still persists for me:

image

Exact steps to reproduce:

  1. Clone this repo: https://github.com/unstoppabledomains/resolution
  2. Rollout local development: https://github.com/unstoppabledomains/resolution#development
  3. Try to rename this method from call to call1 https://github.com/unstoppabledomains/resolution/blob/7e0e9181a3f3d565a029696df393184f9ff15e0f/src/contracts/EthereumContract.ts#L18

My ALEInfo:


 Current Filetype: typescript
Available Linters: ['cspell', 'deno', 'eslint', 'standard', 'tslint', 'tsserver', 'typecheck', 'xo']
  Enabled Linters: ['eslint', 'tsserver']
  Ignored Linters: []
 Suggested Fixers: 
  'deno' - Fix TypeScript using deno fmt.
  'dprint' - Pluggable and configurable code formatting platform
  'eslint' - Apply eslint --fix to a file.
  'prettier' - Apply prettier to a file.
  'remove_trailing_lines' - Remove all blank lines at the end of a file.
  'trim_whitespace' - Remove all trailing whitespace characters at the end of every line.
  'tslint' - Fix typescript files with tslint --fix.
  'xo' - Fix JavaScript/TypeScript files using xo --fix.
 Linter Variables:

let g:ale_typescript_tsserver_config_path = ''
let g:ale_typescript_tsserver_executable = 'tsserver'
let g:ale_typescript_tsserver_use_global = 0
 Global Variables:

let g:ale_cache_executable_check_failures = v:null
let g:ale_change_sign_column_color = 0
let g:ale_command_wrapper = ''
let g:ale_completion_delay = 100
let g:ale_completion_enabled = 1
let g:ale_completion_max_suggestions = 50
let g:ale_disable_lsp = 0
let g:ale_echo_cursor = 1
let g:ale_echo_msg_error_str = 'Error'
let g:ale_echo_msg_format = '%code: %%s'
let g:ale_echo_msg_info_str = 'Info'
let g:ale_echo_msg_warning_str = 'Warning'
let g:ale_enabled = 1
let g:ale_fix_on_save = 0
let g:ale_fixers = {}
let b:ale_fixers = ['eslint', 'prettier']
let g:ale_history_enabled = 1
let g:ale_history_log_output = 1
let g:ale_keep_list_window_open = 0
let g:ale_lint_delay = 200
let g:ale_lint_on_enter = 1
let g:ale_lint_on_filetype_changed = 1
let g:ale_lint_on_insert_leave = 1
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 'never'
let g:ale_linter_aliases = {}
let g:ale_linters = {}
let b:ale_linters = ['tsserver', 'eslint']
let g:ale_linters_explicit = 0
let g:ale_linters_ignore = {}
let g:ale_list_vertical = 0
let g:ale_list_window_size = 10
let g:ale_loclist_msg_format = '%code: %%s'
let g:ale_max_buffer_history_size = 20
let g:ale_max_signs = -1
let g:ale_maximum_file_size = v:null
let g:ale_open_list = 0
let g:ale_pattern_options = v:null
let g:ale_pattern_options_enabled = v:null
let g:ale_root = {}
let g:ale_set_balloons = 0
let g:ale_set_highlights = 1
let g:ale_set_loclist = 1
let g:ale_set_quickfix = 0
let g:ale_set_signs = 1
let g:ale_sign_column_always = 0
let g:ale_sign_error = '>>'
let g:ale_sign_info = '--'
let g:ale_sign_offset = 1000000
let g:ale_sign_style_error = '>>'
let g:ale_sign_style_warning = '--'
let g:ale_sign_warning = '--'
let g:ale_sign_highlight_linenrs = 0
let g:ale_statusline_format = v:null
let g:ale_type_map = {}
let g:ale_use_global_executables = v:null
let g:ale_virtualtext_cursor = 0
let g:ale_warn_about_trailing_blank_lines = 1
let g:ale_warn_about_trailing_whitespace = 1
  Command History:

(executable check - success) /Users/bogdan/makabu/ud/resolution/node_modules/eslint/bin/eslint.js
(finished - exit code 0) ['/bin/zsh', '-c', 'cd ''/Users/bogdan/makabu/ud/resolution'' && ''/Users/bogdan/makabu/ud/resolution/node_modules/eslint/bin/eslint.js'' --parser-options=''{project: null}'' --rule=''{''@typescript-eslint/no-floating-promises'': ''off'', ''@typescript-eslint/no-misused-promises'': ''off''}'' -f json --stdin --stdin-filename ''/Users/bogdan/makabu/ud/resolution/src/contracts/EthereumContract.ts'' < ''/var/folders/gd/qqwx5zqx1wx1pxq5s72hzkdh0000gn/T/nvim35GuT1/1/EthereumContract.ts''']

<<<OUTPUT STARTS>>>
[{"filePath":"/Users/bogdan/makabu/ud/resolution/src/contracts/EthereumContract.ts","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[]}]
<<<OUTPUT ENDS>>>

(executable check - success) /Users/bogdan/makabu/ud/resolution/node_modules/.bin/tsserver
(started) ['/bin/zsh', '-c', '''/Users/bogdan/makabu/ud/resolution/node_modules/.bin/tsserver''']

@jeremija
Copy link
Contributor Author

jeremija commented Feb 2, 2022

Thanks @bogdan! Would you be able to paste the ALE commit you have checked out just make we're testing on the same codebase?

@bogdan
Copy link

bogdan commented Feb 2, 2022

I checked out last master commit (a81512c) and merged this branch.

@jeremija
Copy link
Contributor Author

jeremija commented Feb 2, 2022

Got it. Do you have any other plugins installed that might interfere with this functionality?

I haven't gotten the chance to check out your repo yet, but I've definitely tested tsserver in other projects. I'll see if I can find the time tonight.

I think its failing at the :edit call.

@bogdan
Copy link

bogdan commented Feb 2, 2022

Got it. Do you have any other plugins installed that might interfere with this functionality?

I tried to disable all plugins except ALE and the issue persisted.

@jeremija
Copy link
Contributor Author

jeremija commented Feb 2, 2022

Thanks, just one more question: which version of Neovim are you running?

@bogdan
Copy link

bogdan commented Feb 2, 2022

$ nvim --version
NVIM v0.4.3
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/tmp/neovim-20191107-85913-1wbgqz6/neovim-0.4.3/build/config -I/tmp/neovim-20191107-85913-1wbgqz6/neovim-0.4.3/src -I/usr/local/include -I/tmp/neovim-20191107-85913-1wbgqz6/neovim-0.4.3/deps-build/include -I/usr/local/opt/gettext/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include -I/tmp/neovim-20191107-85913-1wbgqz6/neovim-0.4.3/build/src/nvim/auto -I/tmp/neovim-20191107-85913-1wbgqz6/neovim-0.4.3/build/include
Compiled by brew@Catalina.local

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/Cellar/neovim/0.4.3/share/nvim"

Run :checkhealth for more info

I tried to update to 0.6.1 but nothing changed.

@jeremija
Copy link
Contributor Author

jeremija commented Feb 2, 2022

@bogdan there must be something different in our configurations. I've cloned your repo and it behaves the same as any other TS project:

2022_02_02_22_45_47_recording.mp4

I've also tried disabling all of my configs and plugins except ale with my branch. Running nvim 0.6.1 on Arch Linux. Maybe there's something different on Mac OS?

@hsanson
Copy link
Contributor

hsanson commented Feb 3, 2022

@bogdan from my limited testing this PR does not break anything on my environment and would like to merge it. Is the issue you are seeing caused by this PR? that is, without it the issue does not occur? I cannot merge it if it breaks stuff for others.

@jeremija
Copy link
Contributor Author

jeremija commented Feb 3, 2022

@bogdan could you try disabling all fixers from let b:ale_fixers = ['eslint', 'prettier']?

I don't think these changes are synchronized, perhaps they should be.

@bogdan
Copy link

bogdan commented Feb 3, 2022

@bogdan from my limited testing this PR does not break anything on my environment and would like to merge it. Is the issue you are seeing caused by this PR? that is, without it the issue does not occur? I cannot merge it if it breaks stuff for others.

Well in my case, it made ALERename functionality broken in more places that it was before. It is hard to evaluate if anyone else is affected, but I am ok with that if anyone else is not affected.

@bogdan could you try disabling all fixers from let b:ale_fixers = ['eslint', 'prettier']?

Didn't help.

While debugging all that I was under the expression that the plugin tries to apply changes from all files to a currently open file: here is how EthereumContract.ts files looks after an error inside ALERename command: https://gist.github.com/a29189b4dec2f3acce5778368104c46c (search/highlight for call1) to see the issue.
I've enforced the l:should_save value inside ApplyChanges to 1 and the bug went away.

Any idea what may cause that?

I've put some debug info to make sure it is on the same page.

Inside ale#rename#HandleTSServerResponse:

a:response =>  {'performanceData': {'updateGraphDurationMs': 30}, 'seq': 0, 'request_seq': 1, 'type': 'response', 'success': v:true, 'body': {'info': {'canRename': v:true, 'disp
layName': 'call', 'triggerSpan': {'end': {'offset': 13, 'line': 18}, 'start': {'offset': 9, 'line': 18}}, 'kindModifiers': '', 'fullDisplayName': '"/Users/bogdan/makabu/ud/resol
ution/src/contracts/EthereumContract".EthereumContract.call', 'kind': 'method'}, 'locs': [{'file': '/Users/bogdan/makabu/ud/resolution/src/contracts/EthereumContract.ts', 'locs'
: [{'contextStart': {'offset': 3, 'line': 18}, 'contextEnd': {'offset': 4, 'line': 29}, 'end': {'offset': 13, 'line': 18}, 'start': {'offset': 9, 'line': 18}}]}, {'file': '/Users/bogdan/makabu/ud/resolution/src/UnsInternal.ts', 'locs': [{'end': {'offset': 52, 'line': 64}, 'start': {'offset': 48, 'line': 64}}, {'end': {'offset': 54, 'line': 71}, 'start'
: {'offset': 50, 'line': 71}}, {'end': {'offset': 53, 'line': 86}, 'start': {'offset': 49, 'line': 86}}, {'end': {'offset': 69, 'line': 100}, 'start': {'offset': 65, 'line': 100
}}]}]}, 'command': 'rename'}

Inside ale#code_action#HandleCodeAction:

l:changes =>  [{'fileName': '/Users/bogdan/makabu/ud/resolution/src/contracts/EthereumContract.ts', 'textChanges': [{'end': {'offset': 13, 'line': 18}, 'newText': 'call1', 'star
t': {'offset': 9, 'line': 18}}]}, {'fileName': '/Users/bogdan/makabu/ud/resolution/src/UnsInternal.ts', 'textChanges': [{'end': {'offset': 52, 'line': 64}, 'newText': 'call1', '
start': {'offset': 48, 'line': 64}}, {'end': {'offset': 54, 'line': 71}, 'newText': 'call1', 'start': {'offset': 50, 'line': 71}}, {'end': {'offset': 53, 'line': 86}, 'newText':
 'call1', 'start': {'offset': 49, 'line': 86}}, {'end': {'offset': 69, 'line': 100}, 'newText': 'call1', 'start': {'offset': 65, 'line': 100}}]}]

Inside ale#code_action#ApplyChanges:

/Users/bogdan/makabu/ud/resolution/src/contracts/EthereumContract.ts [{'end': {'offset': 13, 'line': 18}, 'newText': 'call1', 'start': {'offset': 9, 'line': 18}}] {'conn_id': '/Users/bogdan/makabu/ud/resolution/node_modules/.bin/tsserver:/Users/bogdan/makabu/ud/resolution'}

/Users/bogdan/makabu/ud/resolution/src/UnsInternal.ts [{'end': {'offset': 52, 'line': 64}, 'newText': 'call1', 'start': {'offset': 48, 'line': 64}}, {'end': {'offset': 54, 'line
': 71}, 'newText': 'call1', 'start': {'offset': 50, 'line': 71}}, {'end': {'offset': 53, 'line': 86}, 'newText': 'call1', 'start': {'offset': 49, 'line': 86}}, {'end': {'offset'
: 69, 'line': 100}, 'newText': 'call1', 'start': {'offset': 65, 'line': 100}}] {'conn_id': '/Users/bogdan/makabu/ud/resolution/node_modules/.bin/tsserver:/Users/bogdan/makabu/ud
/resolution'} #

@jeremija
Copy link
Contributor Author

jeremija commented Feb 3, 2022

@bogdan thanks for digging into it! Can you try making sure set hidden is in your .vimrc?

You can check the curent setting using :set hidden?.

@bogdan
Copy link

bogdan commented Feb 3, 2022

@bogdan thanks for digging into it! Can you try making sure set hidden is in your .vimrc?

I have set nohidden in vimrc and the bug goes away if I set hidden instead 👍. But I don't really remember why I put set nohidden to .vimrc long ago and I think the plugin should work both ways.

@jeremija
Copy link
Contributor Author

jeremija commented Feb 3, 2022

Maybe we should force save when set nohidden is set. IDK if there are any other consequences of doing that.

@jeremija
Copy link
Contributor Author

jeremija commented Feb 3, 2022

It makes perfect sense that we can't edit files in the background when set nohidden is set:

  'hidden' 'hid'          boolean (default on)
                          global
          When off a buffer is unloaded (including loss of undo information)
          when it is abandoned.  When on a buffer becomes hidden when it is
          abandoned.  A buffer displayed in another window does not become
          hidden, of course.
          Commands that move through the buffer list sometimes hide a buffer
          although the 'hidden' option is off: when the buffer is modified,
          'autowrite' is off or writing is not possible, and the '!' flag was
          used.  See also windows.
          To hide a specific buffer use the 'bufhidden' option.
          'hidden' is set for one command with ":hide {command}" :hide.

@liskin
Copy link
Contributor

liskin commented Feb 3, 2022

Makes me wonder if perhaps going back to #3782 (with the additional didChange dispatch, probably) might be worth considering… :-)

IDK if there are any other consequences of doing that.

If we stick with your approach here, @bogdan with set nohidden will lose undo history of the current file whenever a cross-file rename is done. (If I understand it correctly.) With the existing code + #3782, there's no switching/unloading of buffers, so history isn't lost. But then hitting u will never undo the entire cross-file rename, so maybe that's a stupid argument?

On the other hand your proposed code is way simpler…

@bogdan
Copy link

bogdan commented Feb 3, 2022

The feature that you may undo a change in multiple files is quite superior. I am not sure if any IDE supports that. I would expect the change to multiple files (especially if some files also got renamed) to be automatically saved and irreversible so in case I need to rollback I call ALERename again. Do you have any insight on how it is done IDEs like webstorm?

Is it possible to set should_save to true on in case of set nohidden when tsserver response is passed to codeaction here? https://github.com/dense-analysis/ale/pull/4049/files#diff-d89b532c02fb769c9d6b1613b82b7e7c6c1149e61a1f8a87aee0126eeb5b3508R21

It is also possible to introduce different behaviour if multiple or single files are changed: allow undo the operation (e.g don't write file to disc) in case one file is changed or autosave all files otherwise.

@jeremija
Copy link
Contributor Author

jeremija commented Feb 3, 2022

I just remembered that I had do disable saving of files to get around a bug when modifying open files in the background: whenever such a file was modified and saved ALE would run fixers if they were enabled and then the files would sometimes be modified again, but the LSP wouldn't get notified about this change, which introduced a bug when the same rename operation was performed twice because the LSP response would contain old positions, before the fixer was run.

I wrote about it in the commit message of the first commit:

I also noticed another bug when using Go with gopls LSP and the gofmt fixer. Whenever the file was saved, the gofmt would run and reformat the file. But it seems there was some kind of a race condition so I disabled saving for now, and all of the modified files will be unsaved, so the user should call :wa to save them. I personally like this even better because I can inspect exactly what changes happened, and I instantly see them in the other opened buffers, which was previously not the case.

@bogdan
Copy link

bogdan commented Feb 4, 2022

whenever such a file was modified and saved ALE would run fixers if they were enabled

Is it possible to disable fixers temporarily after when rename operation is performed instead?

@jeremija
Copy link
Contributor Author

jeremija commented Feb 4, 2022

I'm not sure at this point. But this PR has been working perfectly for me with set hidden for months, while the current master is buggy. The only thing I have to remember is to occasionally do is :wa, usually before and after renaming.

@hsanson
Copy link
Contributor

hsanson commented Feb 6, 2022

@jeremija I really want to merge this PR as it does fixes the three issues mentioned in the description and from my testing using ruby solargraph it works very well. But considering that "nohidden" is the default in vim/neovim and that if this option is set then the renaming fails I thinks is hard to justify the merge.

After some thinking I believe the best option here is to tell ALE to save the files by setting "should_save" to true when calling the code action handler. I left comments in the PR showing were to make the changes. I tested this and works find with hidden and nohidden set and also is the way filerename works so I think this is the proper way to handle this.

@@ -116,7 +116,7 @@ function! ale#rename#HandleLSPResponse(conn_id, response) abort
\ 'changes': l:changes,
\ },
\ {
\ 'should_save': 1,
Copy link
Contributor

Choose a reason for hiding this comment

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

Actually seems this was the behavior before?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah it was, the reason why I changed the default is in the description of the first commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, also added an option to disable this behavior.

@jeremija
Copy link
Contributor Author

jeremija commented Feb 6, 2022

But considering that "nohidden" is the default in vim/neovim and that if this option is set then the renaming fails I thinks is hard to justify the merge.

Where did you get that info from? According to the excerpt from Neovim help I posted above, it seems like set hidden is the default. edit Ah, but it's turned off by default in vim.

That said, I understand why you would want to make these changes, but I'd like to at least make the saving optional, and we can warn the users in help that disabling saving won't work with set nohidden. This way we can ensure that the default doesn't break, and we can have the saving optional for those that use set hidden. WDYT?

@jeremija jeremija force-pushed the jeremija/rename-multiple-times branch from bfca341 to 780971d Compare February 7, 2022 06:51
Also provide options to disable automatic saving, as well as instructions to
enable `set hidden` before doing that.
@jeremija jeremija force-pushed the jeremija/rename-multiple-times branch from 780971d to 026de06 Compare February 7, 2022 07:30
@hsanson
Copy link
Contributor

hsanson commented Feb 7, 2022

Making it configurable should be straightforward but honestly I think allowing users to set this variable with the "hidden" option off will result in many shooting themselves in the foot. If "hidden" is off then ALERename will throw cryptic errors and all files won't be properly changed as expected. This most likely will be seen as a bug by many even if documented in the help.

I rather set the behavior based on if hidden is on or off like:

{
    'should_save": !&hidden
}

This would tell ALE to save the buffers if "hidden" is off and don't save them if hidden is on.
Of course also add a note in the documentation explaining this behavior in ALERename.

If you prefer to allow users to change this behavior via a config (e.g. g:ale_save_on_rename) at least make the default use the same logic based on hidden configuration. This way ALE will just work, in the sense that no errors will be thrown, for both hidden on and off.

@hsanson
Copy link
Contributor

hsanson commented Feb 8, 2022

@jeremija great!, thanks for the changes. Tested with hidden and nohidden and works as expected. Just one little detail that is annoying at best. When renaming a class that is used in several files neovim asks me to press enter many times. Three times per file when nohidden is set and twice per file when hidden is set. This is because the "Execute() function calls.

I left some comments in the PR adding silent to the problematic places so this does not happen.

Copy link
Contributor

@hsanson hsanson left a comment

Choose a reason for hiding this comment

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

Just one last request and I think this is ready to merge.

else
let l:lines = readfile(a:filename, 'b')
if l:buffer != l:orig_buffer
call ale#util#Execute('edit ' . a:filename)
Copy link
Contributor

Choose a reason for hiding this comment

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

Add silent so neovim stops asking to press Enter to continue:

call ale#util#Execute('silent edit ' . a:filename)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

call ale#lsp#NotifyForChanges(l:conn_id, l:buffer)

if l:should_save
call ale#util#Execute(':w!')
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here:

call ale#util#Execute(':silent w!')

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

call setpos('.', [0, l:pos[0], l:pos[1], 0])

if l:orig_buffer != l:buffer && bufexists(l:orig_buffer)
call ale#util#Execute('buf ' . string(l:orig_buffer))
Copy link
Contributor

Choose a reason for hiding this comment

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

And here:

call ale#util#Execute('silent buf ' . string(l:orig_buffer))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

@hsanson hsanson left a comment

Choose a reason for hiding this comment

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

Thanks for the work and patience.

@hsanson hsanson merged commit 4a4516e into dense-analysis:master Feb 8, 2022
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.

Send didChange/didSave events after rename
4 participants