GithubHelp home page GithubHelp logo

gaelph / logsitter.nvim Goto Github PK

View Code? Open in Web Editor NEW
31.0 31.0 5.0 53 KB

Makes debugging easy by automating the process of writing logs, for NeoVim

License: MIT License

Lua 98.53% Vim Script 1.47%

logsitter.nvim's People

Contributors

gaelph avatar kamholtz avatar nurou 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

Watchers

 avatar  avatar  avatar

logsitter.nvim's Issues

Feature: place cursor first column, truncate path if too long

Hello,
I was wondering what do you think to place the cursor first column instead of last one ?
When the path is very long with the cursor at the end it shifts the display towards the right which is kinda weird.
Second feature is related, what do you think about truncating the path when it goes like 3 (or whatever) directory deep ?
I'm not sure we really need the all path in logs and it would reduce the length of the string.

Let me know what do you think about it ?
I could try to implement these if you want.

Thank you

Breaking changes to vim.treesitter.query.get_node_text

When attempting to log in a js file (and likely other filetypes) I received this error:

E5108: Error executing lua ...\pack\packer\start\logsitter.nvim/lua/logsitter/init.lua:92: bad argument #1 to 'node_text' (table expected, got nil)
stack traceback:
	[C]: in function 'node_text'
	...\pack\packer\start\logsitter.nvim/lua/logsitter/init.lua:92: in function 'log'
	[string ":lua"]:1: in main chunk

This seems to be due to: nvim-treesitter/nvim-treesitter#2801 (comment)

No node found: Error when setting up from README

Copied the code from the README but when attempting to execute with the require("logsitter").log() function it gives the following error no matter the filetype. Attempted js and lua files.

E5108: Error executing lua: .../pack/packer/start/logsitter.nvim/lua/logsitter/init.lua:88: Vim(echoerr):No node found

stack traceback:
        [C]: in function 'cmd'
        .../pack/packer/start/logsitter.nvim/lua/logsitter/init.lua:88: in function 'log'
        [string "..."]: in function <[string "..."]:0>

Feature Request: visual mode

Thanks for this plugin. Super useful.

Do you think it might be good to have a visual mode version? That would allow us to set up a logging statement for an expression instead of for a particular variable. Again, awesome job!

Add python capability

Are you accepting PRs? If so I might take a stab at adding some support for python files.

README error

Hello !

Small mistake in the README. It is written

use {"gaelph/logsitter", requires = {"nvim-treesitter/nvim-treesitter"}}

while it should be

> use {"gaelph/logsitter.nvim", requires = {"nvim-treesitter/nvim-treesitter"}}

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.