Comments (3)
For python files, it auto indents too far
Does it means following?
def foo(
arg, # you want 4 spaces but 8 spaces
If so, this may not be the lexima's issue.
lexima.vim respects vim's indent settings (e.g. indentexpr=python#GetIndent(v:lnum)
for python file).
You can confirm this by the following steps.
- disable lexima.vim (comment out lua setting)
- open a new python file
- input
def foo(<CR>
- check indent width
from lexima.vim.
Thank you for the response! I was looking around further last night and I am getting the same issues with another auto pairing plugin (nvim-autopairs), so I think the issue is on my end somehow and not with lexima.
Yes, when I do your test I get the following,
def foo(
|
)
with 8 spaces instead of 4, and the bottom closure is indented automatically as well.
Do I need a require(...) statement somewhere in my configs? I am using lua configs with neovim on a mac. I tried adding require('lexima.vim').setup()
but it threw an error saying it couldn't find the module "lexima.vim".
Currently all I have is the entry {'cohama/lexima.vim'}
in my Lazy plugins list.
Much thanks!
EDIT: I've removed lexima and added nvim-autopairs and was getting similar results, so then I removed both and now I get strange behavior with indentation sometimes respecting my config and sometimes not... So idk what's going on but my nvim seems screwed up. I've done tests before on another machine and with minimal configs and couldn't a straight answer. Might not be a lexima config issue after all but an nvim issue.
from lexima.vim.
OK, fixed! My treesitter seemed to be broken (although I wasn't getting error messages until I started messing with it.) I had to install a more up-to-date version of gcc on my mac via brew install gcc
, then I uninstalled all treesitter plugins and reinstalled.
Seems to work now for Python and Lua well. Also seems to work with Dart, but there was a 2 second delay after hitting and when the brackets open up. Disabling treesitter made it fast, but gave me the odd behavior where the lower bracket would end up in the wrong place. I tracked that issue down to this (nvim-treesitter/nvim-treesitter#4945), so I've disabled folding for now and things seem to be flowing smoothly.
Wasn't lexima's fault whatsoever so I really appreciate your time and attention! Hopefully this helps others in the future.
Regards.
EDIT: Turns out disabling the treesitter fold wasn't the issue. It's still slow to indent upon for the first in each use, then faster from there regardless of using the foldexpr or not. So not sure what that's about but it's livable for now and still not lexima's fault.
from lexima.vim.
Related Issues (20)
- Prevent auto-close of quote when standing at a word boundary? HOT 4
- Lexima seemingly breaking "set nocompatible" HOT 4
- [Feature Request] Add g:lexima_manually_keys HOT 8
- Problem using lexima with multi-cursor when press Esc HOT 5
- expanding strings instead of letters HOT 3
- Case-sensitive HOT 10
- The "at" rule does not support \V in command-line mode HOT 5
- 'except' on cmdline mode is not working
- Abbreviations are not expanded in command-line mode HOT 1
- <Tab> key HOT 1
- Possibility of supressing flickering of Command mode while pressing backspace HOT 3
- How can I add rules for {} and [] HOT 3
- Add endwise rules for Lua. HOT 2
- "LISP mode"? don't pair singlequote or backtick in certain filetypes HOT 2
- There is no lexima-key-mappings section in the document HOT 2
- Is it possible to make lexima continue a bullet list? HOT 2
- Way to prevent autocomplete if Esc is pressed? HOT 2
- Package for luarocks HOT 1
- Unexpected behaviour on Neovim with ALE HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lexima.vim.