IntelliJ-EmmyLua icon indicating copy to clipboard operation
IntelliJ-EmmyLua copied to clipboard

Some enhancements for hotkey commenting

Open IS2511 opened this issue 5 years ago • 0 comments

Environment(环境)

name version
IDEA version CL 2020.1.1
EmmyLua version 1.3.4.157-IDEA202
OS Linux 5.6.0-2parrot1-amd64

What are the steps to reproduce this issue?(重现步骤?)

  1. Write something on a line
  2. (Optional) Write more than 1 line and select all of them
  3. Press Ctrl + / or activate "Comment with Line Comment"

What happens?(出现什么问题?)

If there is no code selected, then the cursor jumps to the next line after commenting.
There are no spaces after --. Example:

local a = 10
a = 20

=>

--local a = 10
--a = 20

What were you expecting to happen?(期望?)

The cursor stays in the same position as before.
There is a space after every --.
Example:

local a = 10
a = 20

=>

-- local a = 10
-- a = 20

Any logs, error output, etc?(有没有什么log, error输出?)

Any other comments?(其它说明)

Also would be nice to add spaces for block comments ("Comment with Block Comment"). Example:

local a = 10
a = 20

Happens =>

--[[local a = 10
a = 20]]

Expected =>

--[[ local a = 10
a = 20 ]]

Of course the "uncomment" should remove these extra spaces in both line and block comments.

Feature request? Probably enhancement.

IS2511 avatar Aug 16 '20 18:08 IS2511