Coder Social home page Coder Social logo

lite-plugins's Introduction

Plugins for the lite text editor

Note: if you make a pull request, the table should be updated and kept in alphabetical order. If your plugin is large (or you'd otherwise prefer it to have its own repo), the table can simply be updated to add a link to the repo; otherwise the plugin file itself can be submitted. If a plugin's link resolves to something other than a raw file it should be marked with an asterisk.


Plugin Description
autoinsert Automatically inserts closing brackets and quotes
autowrap Automatically hardwraps lines when typing
bigclock Shows the current time and date in a view with large text (screenshot)
black* Integrates the black Python formatter with lite
bracketmatch Underlines matching pair for bracket under the caret (screenshot)
centerdoc Centers document's content on the screen (screenshot)
closeconfirmx Replaces a system close confirmation dialog with a command view, like for individual files (screenshot)
colorpreview Underlays color values (eg. #ff00ff or rgb(255, 0, 255)) with their resultant color. (screenshot)
console* A console for running external commands and capturing their output (gif)
contextmenu* Simple context menu (screenshot)
copyfilelocation Copy file location to clipboard
datetimestamps Insert date-, time- and date-time-stamps
detectindent Automatically detects and uses the indentation size and tab type of a loaded file
dragdropselected Provides basic drag and drop of selected text (in same document)
drawwhitespace Draws tabs and spaces (screenshot)
eofnewline Make sure the file ends with one blank line.
eval Replaces selected Lua code with its evaluated result
exec Runs selected text through shell command and replaces with result
fallbackfonts* Adds support for fallback fonts (gif)
ghmarkdown Opens a preview of the current markdown file in a browser window (screenshot)
gitstatus Displays git branch and insert/delete count in status bar (screenshot)
gofmt Auto-formats the current go file, adds the missing imports and the missing return cases
hidelinenumbers Hides the line numbers on the left of documents (screenshot)
hidestatus Hides the status bar at the bottom of the window
inanimate Disables all transition animations
indentguide Adds indent guides (screenshot)
language_angelscript Syntax for the Angelscript programming language
language_batch Syntax for Windows Batch Files
language_cmake Syntax for the CMake build system language
language_cpp Syntax for the C++ programming language
language_csharp Syntax for the C# programming language
language_d Syntax for the D programming language
language_dart Syntax for the Dart programming languiage
language_elixir Syntax for the Elixir programming language
language_elm Syntax for the Elm programming language
language_fe Syntax for the fe programming language
language_fennel Syntax for the fennel programming language
language_gdscript Syntax for the Godot Engine's GDScript scripting language
language_glsl Syntax for the GLSL programming language
language_go Syntax for the Go programming language
language_hlsl Syntax for the HLSL programming language
language_hs Syntax for the Haskell programming language
language_java Syntax for the Java programming language
language_jiyu Syntax for the jiyu programming language
language_ksy Syntax for Kaitai struct files
language_make Syntax for the Make build system language
language_meson Syntax for the Meson build system language
language_moon Syntax for the MoonScript scripting language
language_nim Syntax for the Nim programming language
language_objc Syntax for the Objective C programming language
language_odin Syntax for the Odin programming language
language_php Syntax for the PHP programming language
language_pico8 Syntax for Pico-8 cartridge files
language_powershell Syntax for PowerShell scripting language
language_psql Syntax for the postgresql database access language
language_rust Syntax for the Rust programming language
language_sh Syntax for shell scripting language
language_teal Syntax for the Teal programming language, a typed dialect of Lua.
language_tex Syntax for the LaTeX typesetting language
language_ts Syntax for the TypeScript programming language
language_wren Syntax for the Wren programming language
lastproject Loads the last loaded project if lite is launched without any arguments
lfautoinsert Automatically inserts indentation and closing bracket/text after newline
linecopypaste Copy, cut and paste the current line when nothing is selected
lineguide Displays a line-guide at the line limit offset (screenshot)
linter* Linters for multiple languages
lint+* Advanced linter with ErrorLens-like error reporting. Compatible with linters made for linter (screenshot)
macmodkeys Remaps mac modkeys command/option to ctrl/alt
markers Add markers to docs and jump between them quickly (screenshot)
motiontrail Adds a motion-trail to the caret (screenshot)
nagbar* consistent and beautiful confirmation dialogs for lite and lite-xl (gif)
openfilelocation Opens the parent directory of the current file in the file manager
openselected Opens the selected filename or url
projectmanager Save projects and load/reload them quickly
rainbowparen Show nesting of parentheses with rainbow colours
scale Provides support for dynamically adjusting the scale of the code font / UI (ctrl+-, ctrl+=)
scalestatus Displays current scale (zoom) in status view (depends on scale plugin)
selectionhighlight Highlights regions of code that match the current selection (screenshot)
sort Sorts selected lines alphabetically
spellcheck Underlines misspelt words (screenshot) — note: on Windows a words.txt dictionary file must be placed beside the exe
tabnumbers Displays tab numbers from 1–9 next to their names *(screenshot)
theme16* Theme manager with base16 themes
themescheduler Schedule themes to be used at certain times
titleize Titleizes selected string (hello world => Hello World)
todotreeview* Todo tree viewer for annotations in code like TODO, BUG, FIX, IMPROVEMENT
togglesnakecamel Toggles symbols between snake_case and camelCase
unboundedscroll Allows scrolling outside the bounds of a document
workspace Retains project's layout and open documents between sessions

lite-plugins's People

Contributors

bbs4murai avatar bokunodev avatar codecat avatar devincarr avatar doczi-dominik avatar drmargarido avatar esprimo avatar franko avatar gaarco avatar hotdang-ca avatar ieeemma avatar imolein avatar liquidev avatar lordadamson avatar machinamentum avatar mathewmariani avatar mundusnine avatar nikneym avatar p410n3 avatar polyfructol avatar pta2002 avatar quadroli avatar rxi avatar swissalps avatar takase1121 avatar technomancy avatar terickson001 avatar tiziw avatar tmpod avatar whiteh0le avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lite-plugins's Issues

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

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.

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'

[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 :)

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

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>

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

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] 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]: 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. :-)

Ruby

Please add ruby formater/color

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.

Closing Current Tab

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

[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.

[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 :)

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.

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!!!

[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 👌

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}

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?

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 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

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).

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

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.

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.