Giter Club home page Giter Club logo

Comments (3)

stevearc avatar stevearc commented on May 17, 2024

Added some config options for different relative floats, and made the width/height options more flexible (you can specify percentages, rows/cols, or both). There's an escape hatch in config.float.override that will let you customize any of the values if you want.

Give it a try! Let me know if the defaults make sense. I also had to rework a decent chunk of the existing width calculation logic, so let me know if you find any bugs.

from aerial.nvim.

dccsillag avatar dccsillag commented on May 17, 2024

Oops, sorry for the delay, totally thought I had already responded.

Thank you very much! I played around with it a bit, and everything seems to be working. Nice work!

Yeah, the defaults seem pretty reasonable.

(Note: I'm personally using something a bit more customized (in Yuescript):

                override: (conf) ->
                    local stats = vim.api.nvim_list_uis![1]
                    local width = stats.width
                    local height = stats.height - 1 -- to account for the statusline
                    local padding_x = math.floor(0.1 * width)
                    local padding_y = math.floor(0.1 * height)

                    conf.width = width - 2*padding_x
                    conf.height = height - 2*padding_y
                    conf.row = padding_y - 1
                    conf.col = padding_x - 1
                    conf.anchor = "NW"

                    conf

)

from aerial.nvim.

stevearc avatar stevearc commented on May 17, 2024

I think that you should be able to get a similar layout with:

require('aerial').setup({
  float = {
    relative = 'editor',
    width = 0.8,
    max_width = 0.8,
    height = 0.8,
    max_height = 0.8,
  }
})

But regardless, glad it's working for you!

from aerial.nvim.

Related Issues (20)

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.