neon-syntax icon indicating copy to clipboard operation
neon-syntax copied to clipboard

Autocomplete popup position

Open bogdancss opened this issue 5 years ago • 2 comments

For a while now, the Autocomplete popup has been misaligned:

Screenshot 2020-02-27 at 16 06 18

I tested this on a fresh install of Atom only with this syntax theme installed.

bogdancss avatar Feb 27 '20 16:02 bogdancss

I uninstalled the theme and copied over the theme styles over to the local styles.less file. By commenting out the lines that handle the filter, seems to prevent the autocomplete popup from being misaligned:

Screenshot 2020-02-27 at 16 32 21

Screenshot 2020-02-27 at 16 34 19

But now the glow is gone ☹️

bogdancss avatar Feb 27 '20 16:02 bogdancss

Hey, I was looking for a solution to this too, and I found out that the following code worked.

Replace the lines at the top of base.less with:

atom-text-editor span {
  -webkit-filter: contrast(@contrast);
  -webkit-filter: saturate(@saturation);
}

atom-text-editor {
  background-color: @syntax-background-color;
  color: @syntax-text-color;

  .invisible-character {
    color: @syntax-invisible-character-color;
  }

  .indent-guide {
    color: @syntax-indent-guide-color;
  }

  .wrap-guide {
    color: @syntax-wrap-guide-color;
  }

  .gutter {
    background-color: @syntax-gutter-background-color;
    color: @syntax-gutter-text-color;

    .line-number {
      &.cursor-line {
        background-color: @syntax-gutter-background-color-selected;
        color: @syntax-gutter-text-color-selected;
      }

      &.cursor-line-no-selection {
        color: @syntax-gutter-text-color-selected;
      }
    }
  }

  .search-results .syntax--marker .region {
    background-color: transparent;
    border: @syntax-result-marker-color;
  }

  .search-results .syntax--marker.current-result .region {
    border: @syntax-result-marker-color-selected;
  }
}

The problem was probably the filter being applied to everything inside of the editor, when it only needs to be applied to the main text content inside the editor.

However, you may experience some performance issues, because it is applying the filter to more elements now.

This is a quick hack to temporarily resolve the issue.

ochen1 avatar Jul 30 '20 19:07 ochen1