Code Monkey home page Code Monkey logo

Comments (5)

quesada avatar quesada commented on July 3, 2024

I tried using chatGPT 4 to solve the problem, while looking at the code myself. I'm new to lua and textadept. I didn't manage, every fix suggested by chatGPT was totally a failure :)
This is the conversation. Interesting that it seems to know so much about textadept (a surprise) but it's all wrong!

https://chat.openai.com/share/d14227e6-9988-4ae6-88ee-2c7e9a5e7c42

from textadept.

orbitalquark avatar orbitalquark commented on July 3, 2024

Fascinating. It looks like chatGPT's knowledge of Textadept is up-to-date in some places, but outdated in others. This auto-close feature is called auto-pair, and the manual demonstrates how to turn it off (https://orbitalquark.github.io/textadept/manual.html#adept-editing). Put the following in your ~/.textadept/init.lua:

textadept.editing.auto_pair = nil

If you just want to turn off the behavior for apostrophes, you'd use

textadept.editing.auto_pair["'"] = nil

from textadept.

quesada avatar quesada commented on July 3, 2024

Thanks so much! You are right, it's in the manual; really sorry I wasted your time. And also sorry I thought it would be faster to use chatGTP than reading the manual. A pity it's so inconsistent. It would be wonderful it it knew the latest API. Maybe one can try doing retrieval-augmented-generation with an open source LLM using the docs... interesting side project! maybe I'll attempt it.

I tried both solutions, and somehow they didn't work for me. The first one fails silently, second one with an error
image

Here's my init.lua (could be there's an interaction with something else?)
https://pastebin.com/edDv1cc6

from textadept.

orbitalquark avatar orbitalquark commented on July 3, 2024

That was my mistake. It's textadept.editing.auto_pairs. Note the trailing 's'. Sorry about that.

from textadept.

quesada avatar quesada commented on July 3, 2024

Thanks, that works, closing issue

from textadept.

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.