Giter Site home page Giter Site logo

scratch.nvim's Introduction

banner

Hello, I am a Rust developer that loves making some Neovim Lua plugins.

Projects I am maintaining currently:

Projects that I maintain, but taking a break from:

Abandoned projects that I'd like to work on:

Finished projects:

scratch.nvim's People

Contributors

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

Watchers

 avatar  avatar

scratch.nvim's Issues

setup function for configuration

Hi, i would like to make the scratch buffer a split or float.

I dont see a setup function, will it be added in future? ๐Ÿ˜…

[Bug] Give a proper error message for buffers that don't evaluate

Usually when I need a scratch buffer, it's to put information that I don't intend to execute.
I used to use Emacs for notetaking but I'm using neovim now.

Right now, if I try to open a scratch buffer of type markdown, it gives me a cryptic error message.

Seems like you've sort of hardcoded that functionality. I'm not sure how you would like it to be instead though.

function buffer.eval()
local lines = vim.api.nvim_buf_get_lines(buffer.bufnr, 0, -1, true)
local filetype = vim.api.nvim_buf_get_option(buffer.bufnr, "filetype")
require("scratch.eval")[filetype](lines)
end

Can you add filetypes for markdown, org, asciidoc, and plaintext? That should cover the major ones.
Maybe also add json, yaml, xml, and other information types that also don't evaluate.

Steps:

  1. Run ex command :Telescope scratch md

Expected:

Open the buffer without issue.

Actual:

A cryptic error message is shown to me.

Workaround:

Just use :ScratchNew md

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.