Comments (6)
Good shout @rlch, I've added that in as well. Tbh I think long term there's a better way to do this e.g. just not analysing anything that's not in the current workspace 🤔
from flutter-tools.nvim.
@RobertBrunhage thanks for raising this 👍🏾 I hadn't really paid too much attention but I was able to reproduce this. I don't think it relates to compe
since it's activities are primarily through completion so any lag it causes would be during completion.
I think the main issue here is possibly how I've set up the language server. At the moment it doesn't exclude any folders from being analysed so when you jump into an sdk package it tries to analyse the entire folder i.e. all the packages from wherever it determines the root to be which is going to a) be too many files and b) not useful since you don't need analysis like diagnostics for an sdk package.
I've tried locally using the
lsp = {
settings = {
analysisExcludedFolders = {vim.fn.expand("$HOME/flutter/packages")}
}
}
which seems to stop the lag on my machine. Can you try adding the path to your flutter binary (if you use a mac and it's installed in your home dir) you can just use exactly what I used there,
to see if it makes it less laggy on your end?
If that works then I will add this in as a default so people can jump into the sdk definitions without lag.
from flutter-tools.nvim.
Just a tip; I would also recommend adding vim.fn.expand("$HOME/flutter/.pub-cache")
to this table to stop analysis on pub.dev packages.
This really improved my performance :)
from flutter-tools.nvim.
Awesome, that makes a lot more sense!
I tested it out and worked great, no more lag!
I tried defining it like this which didn't work
require("flutter-tools").setup{
lsp = {
on_attach = on_attach,
settings = {
analysisExcludedFolders = {vim.fn.expand("%HOMEDRIVE%/src/flutter/packages")}
}
}
}
but replacing %HOMEDRIVE% with just C: worked well (I am using Windows).
from flutter-tools.nvim.
@akinsho any plans for adding this to only analyze in the current workspace? Getting this same issue when I navigate to packages code that I depend on.
from flutter-tools.nvim.
@RobertBrunhage I still don't really have any clue how I would do that, there is no explicit option in the lsp spec that provides this. onlyAnalyzeProjectsWithOpenFiles
is the closest thing that sounds right but it won't actually stop huge files or their containing projects being analysed. If anyone has a good suggestion 🤷🏿♂️
from flutter-tools.nvim.
Related Issues (20)
- Add herline.nvim support HOT 1
- [BUG] can't set border style
- [BUG]Could not found flutter-tools command HOT 1
- [Feature Request] More Feedback for Slow Operations
- [BUG] FlutterWidgetGuides highlight group gets overwritten on entering dart file
- [Help] lsp code formatter line width HOT 1
- [Help] How to debug example project of a library HOT 5
- [BUG] Invalid line number
- [ISSUE] FlutterDevices Slow to Open HOT 1
- Not a issue- Just a thank you
- Feature: adding build runner command HOT 3
- [BUG] renaming file with _test.dart
- How do I open a Widget Inspector? HOT 1
- [FR] Ability to set DEV LOG position HOT 1
- [Help] How do i enable highlight in Outline Window?
- [BUG] fvm not working on windows HOT 2
- Neovim LSP autocompletes everything twice when working with Flutter(dart) HOT 1
- [BUG] flutter-tools in Lazy.nvim HOT 3
- [BUG] lsp code actions not loading in nvim 0.10
- lsp-dart vs flutter-tools HOT 2
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 flutter-tools.nvim.