Code Monkey home page Code Monkey logo

Comments (10)

krady21 avatar krady21 commented on July 1, 2024

Hi. I think you may have sent the same link twice there. If you refer to source to assembly and assembly to source line highlighting (as it happens on the compiler explorer website) then the feature is already supported. All you have to do is add
open_qflist = true to the setup function. I am sorry if the documentation is not yet up to par, but I haven't had the chance to add some vimdocs or a features section to the README just yet. Let me know if this is the feature you were referring to.

from compiler-explorer.nvim.

Shatur avatar Shatur commented on July 1, 2024

Oh, got, thank you!

from compiler-explorer.nvim.

Shatur avatar Shatur commented on July 1, 2024

@krady21 I tried setting

require("compiler-explorer").setup({
  open_qflist = true,
})

But it stopped to use Telescope for selection.

from compiler-explorer.nvim.

krady21 avatar krady21 commented on July 1, 2024

oops, my bad. I meant to give give you another option:

require("compiler-explorer").setup({
  autocmd = {
    enable = true,
    hl = "Search",
  }
})

The enable is the important part, while hl allows you to change the highlight group. I think that i am using CursorLine as the default highlight group so that it would match well if you have the set cursorline option on.

open_qflist = true opens the quickfix list which should be populated by the errors, warnings and diagnostics received from compiler-explorer.

from compiler-explorer.nvim.

Shatur avatar Shatur commented on July 1, 2024

I meant to give give you another option:

Same here, with this configuration I losing selection through Telescope. Is this expected?

from compiler-explorer.nvim.

krady21 avatar krady21 commented on July 1, 2024

What do you mean by losing selection? To be fair, I've only tested the plugin very briefly with telescope as the backend for dressing.nvim because i mainly use fzf-lua. Could you walk me through the commands and the source code that you used in this scenario?

from compiler-explorer.nvim.

Shatur avatar Shatur commented on July 1, 2024

Without any configuration :CECompile opens selection (expected!):
изображение

But if I call setup() selection looks like this after calling :CECompile:
изображение

from compiler-explorer.nvim.

krady21 avatar krady21 commented on July 1, 2024

Sorry for the late reply. I could not reproduce this with telescope and by running the setup() function. The setup code does not interfere with the other plugins that override vi.ui, so I'm not exactly sure why this happens. Maybe you resourcing your init.lua or init.vim switches back to the default vim.ui.select.

from compiler-explorer.nvim.

Shatur avatar Shatur commented on July 1, 2024

Sorry for the late reply. I could not reproduce this with telescope and by running the setup() function. The setup code does not interfere with the other plugins that override vi.ui, so I'm not exactly sure why this happens

I think I know why it happens. These lines:

local vim_select = async.wrap(vim.ui.select, 3)
local vim_input = async.wrap(vim.ui.input, 2)

cache vim.ui.select. And in my case vim.ui.select initializes after it if I call setup because file is being loaded.

from compiler-explorer.nvim.

Shatur avatar Shatur commented on July 1, 2024

Opened #4.

from compiler-explorer.nvim.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.