Git Product home page Git Product logo

lite-plugins's Issues

Add support for shell files without .sh suffix

The shell-language plugin only works on files with the .sh suffix by default. At least on Linux a file doesn't need this suffix in order to be a valid shell file.

What I rather suggest is allowing to check the first line to be either !/bin/sh or !/usr/bin/env sh (or bash).

Gitstatus plugin pops up cmd continually

When using a lite.exe shortcut to open lite in the project directory, the git status plugin doesn't stop starting and stopping cmd.exe. It is probably trying to connect to git or start a git instance and it cant because its a shortcut ?

Issue doesn't happen when starting lite by clicking the exe directly.

image

[bug] nil value fp when using plugin last project

An error occurs that shows up in the logs that fp is a nil value when using the lastproject.lua plugin, this has occured no matter whether if i open the progrom with an argument or not, here is a snippet:

lite error

i run Manjaro linux, 64 bit, kindly do review this, it would be such a handy feature to use, at the moment i have resulted to deleting the plugin entirely, sorry but i don't quite have sufficient knowledge in Lua nor C for that matter, kindly do resolve this, it would be such a handy feature to have, and also great text editor u've made here, i'm definitely looking forward to maining it ☺️, good work 👌

[Plugin Request] Minimap

From VSCode documentation:

A Minimap (code outline) gives you a high-level overview of your source code, which is useful for quick navigation and code understanding. A file's minimap is shown on the right side of the editor. You can click or drag the shaded area to quickly jump to different sections of your file.

To further improve location awareness, it can highlight which line you are on and what is selected.

Feature request: exposed window bounds setter and getter methods

If methods were exposed to lua side, then workspace could save and restore window position and size.
Maybe also state (maximised) flags.

On my dual-screen station, lite keeps opening on second screen instead of on main screen, it is annoying me somewhat.

Adding a license to -plugins

Hello,

I assume this is licensed under the MIT like lite, but a license file/license headers would be required to actually make that clear

Closing Current Tab

There's no 'x' Cross for closing the open tabs can someone add them.
Thanks.

Intelligence in imports (JAVA)

I have a problem (I don't know if the code editor is made like this) but the imports in java are not autocompleted like in another code editor
2021-05-26-173006_953x310_scrot

[Plugin request] Svelte

Hello,

I have tried to make my own syntax but always failed, with syntaxing something from CSS in JS code or HTML code in JS code.

I would need to differ the syntax in <script> JS code </script>, <style> CSS code </style>code and in any other area of the code to have HTML syntax.

Or can it be done only with the syntax function that exists?

thanks
Lumir

lite crashes when both indentguide plugin and eofnewline are installed

lite is crashing when I have indentguide plugin installed together with eofnewline.
When I save a file:

Error: .../lite/data/plugins/indentguide.lua:15: attempt to perform arithmetic on local 'dir' (a nil value)
stack traceback:
	.../lite/data/plugins/indentguide.lua:15: in function <.../lite/data/plugins/indentguide.lua:8>

Crash with drawwhitespace plugin

Hello,

with the full plugin pack installed lite 1.03 crashes with the following error message:

Error: /usr/share/lite-editor/data/plugins/drawwhitespace.lua:14: attempt to call method 'get_cached_line' (a nil value)
stack traceback:
	/usr/share/lite-editor/data/plugins/drawwhitespace.lua:14: in function 'draw_line_text'
	/usr/share/lite-editor/data/plugins/indentguide.lua:44: in function 'draw_line_text'
	/usr/share/lite-editor/data/plugins/spellcheck.lua:58: in function 'draw_line_text'
	/usr/share/lite-editor/data/core/docview.lua:305: in function 'draw_line_body'
	/usr/share/lite-editor/data/plugins/selectionhighlight.lua:35: in function 'draw_line_body'
	/usr/share/lite-editor/data/core/docview.lua:351: in function </usr/share/lite-editor/data/core/docview.lua:330>
	(...tail calls...)
	/usr/share/lite-editor/data/plugins/lineguide.lua:8: in function 'draw'
	/usr/share/lite-editor/data/core/commandview.lua:251: in function 'draw'
	/usr/share/lite-editor/data/core/rootview.lua:353: in function '?'
	/usr/share/lite-editor/data/core/rootview.lua:47: in function 'propagate'
	/usr/share/lite-editor/data/core/rootview.lua:358: in function '?'
	/usr/share/lite-editor/data/core/rootview.lua:48: in function 'propagate'
	/usr/share/lite-editor/data/core/rootview.lua:358: in function 'draw'
	/usr/share/lite-editor/data/core/rootview.lua:479: in function 'draw'
	/usr/share/lite-editor/data/plugins/autocomplete.lua:195: in function 'draw'
	/usr/share/lite-editor/data/core/init.lua:374: in function 'step'
	/usr/share/lite-editor/data/core/init.lua:414: in function 'run'
	[string "local core..."]:9: in function <[string "local core..."]:2>
	[C]: in function 'xpcall'

Question : Workspace plugin

Hi,

I recently used the workspace plugin. I currently created the file .lite_workspace.lua manually to make it work. Didn't noticed any command to save the workspace.

Isn't that helpful to have a command to save workspace / open workspace?

Thank you.

[plugin] relative goto home

I'm trying to create a plugin that changes the behavior of home command. Pressing it you move the caret to the end of the line, ignoring whitespaces at the beginning. Then if you press it again the caret moves to the real end of line, like in VS Code. How do I do it? I attempted to replace the "move-to-start-of-line" command but I got a "the 'new' method is nil" error.
My current code:

local core    = require('core')
local keymap  = require('core.keymap')
local command = require ('core.command')

local function better_home(doc, line, col)
    local text = doc():get_text(doc():get_selection())

    core.log('[' ..text .. ']') -- just debugging to see if it would be called
    return line, 1
end

command.add("core.docview", {
    ["bttr_home"] = function()
        core.active_view.doc():move_to(better_home, core.active_view())
    end
})

keymap.add({
    ["home"] = "bttr_home"
})

[Plugin Request] Color picker

Hi, I haven't seen any other editor as light with this function. I think it could be very wanted for those editing simple css :)

Moonscript keyword highlighting issue

On moonscript, if theres a {, a keyword will be highlighted with function style color.
image

Correct highlighting:

toPath = (path) ->
    if isArray path
        path
    else { path }

This occurs with any keyword.
image

Correct highlighting:

toPath = (path) ->
    if isArray path
        return path
    else
        return {path}

Vi keybindings

Question: (Just curious) is there anything that would preclude a plugin from providing a vi/vim keybindings? I know this may not be popular with a lot of folks, but my finger memory after 30 years of using vi is hard to erase. I really like how lightweight this is so far and I don’t want ask the question with the intent of making this a vi clone.

[Plugin Request] .editorconfig support

Porting the issue from rxi/lite#142

.editorconfig is a nice "standardised" way of specifying some configurations across all editors that support it. This is a neat tool to use in big projects with lots of contributorsa and it would be cool to have in lite too, if not on the core, at least as a plugin.

You can read more about .editorconfig at https://editorconfig.org

I do not know Lua nor this project so at the moment I'm not able to write such plugin. I'd be really thankful if someone with more experience would do it, but if that doens't happen I'll eventually write it :)

Add toggle support for plugins

I like how drawwhitespace.lua works, but I would like to enable it via toggle option when I need to.

I'm sure many more plugins need this feature.

Is it something it could be added easily?

help in a regexp for symbol

I copied language_jennel to language_janet to make a Janet language plugin.
but I cant resolve the symbol regexp.

A symbol can be:
:symbol
:my-symbol
:just/another

thanks!!!

Issue: workspace-plugin doesn't work on windows 10

Lite version:
1.03
OS:
windows 10
Issue description:
workspace-plugin doesn't save and load .lite_workspace file outside C:\lite folder. Even if file precreated in root folder of project.
Steps to reproduce:
create new folder anywhere in system, make a new file with with preffered (go, lua, py...) extension, close lite.

Ruby

Please add ruby formater/color

inanimate.lua making startup really slow

I really don't know what's happening but if inanimate is in my plugins folder it makes startup take up to 10 seconds. There's no log file that appears in case of an error or anything, and because it's such a small plugin I don't really know what could be happening. I've removed literally every other plugin except inanimate and the slowness persists.

Request: code folding

A code folding plugin would be really helpful. Ideally it could automatically detect fold points at {} and indentation, and could allow you to define fold points like so

-- Something {{{
code here!
-- }}}

-- folded up looks like:
+-- 1 line: Something

This is how Vim handles it, other syntax or behavior would be fine too. Ive been trying to write this myself but I don't know enough Lua or enough about the lite api to make it work.

[Plugin request]: autosave / caching

It will be really useful if Lite had a caching plugin, saving some documents users are working on in an internal directory with a pre-configured time interval: it might save hours of coding for someone later. Many times, probably. :-)

scale plugin error attempt to index local 'text' (a nil value)

Changing the font size when there is only one line of text in a file generates an error:
data/core/common.lua:11 attempt to index local 'text' (a nil value)

Workaround:
Add a check to make sure that (n - view.size.y) isn't zero before line 51 in function set_scale to prevent a division by zero error.

Change:

   if n ~= math.huge and not view:is(CommandView) then
      scrolls[view] = view.scroll.y / (n - view.size.y)
    end

To:

    if n ~= math.huge and not view:is(CommandView) then
      if (n - view.size.y) ~= 0 then
        scrolls[view] = view.scroll.y / (n - view.size.y)
      end
    end

Copying filelocation

Sometimes I need to copy the file location and share to someone in the team.

So I wrote a small plugin looking at some of the lua files. I am learning lua via lite. So thought of sharing it as gist for this currently doesn't have copy clipboard in Windows.

-- data/plugins/copyfilelocation.lua
local core = require "core"
local command = require "core.command"
local config = require "core.config"


command.add("core.docview", {
  ["copy-file-location:copy-file-location"] = function()
    local doc = core.active_view.doc
    if not doc.filename then
      core.error "Cannot copy location of unsaved doc"
      return
    end
    local filename = doc.filename
    core.log("Copying \"%s\"", filename:gsub(".lua$", ""))
    if PLATFORM == "Windows" then
--       os.execute(string.format("start %s %s", config.filemanager, folder_name))
    else
      os.execute(string.format("echo %s | xclip -selection clipboard", filename:gsub(".lua$", "")))
    end
  end
})

If this can be improved or need a PR I am happy to send it.

Thank you.

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.