Comments (9)
@tredeneo the issue on linux
is with how snap
install packages, there's some magic complexity in there with symlinks so it doesn't work the same with cli
tools such as neovim using jobstart('flutter <cmd>')
which is what this plugin does. The solution would be to overwrite the path the lsp. In the case of snap
that would be
echo $HOME/snap/flutter/common/flutter/bin/flutter
but you need the binary for the lsp
server. which would be in that folder area somwhere. You would need to override the cmd
for the language server.
regarding windows tbh I don't use windows and can't test windows so I can't explicitly support it, but if people are willing to add functionality for it and test that it works I'd be happy to merge them
from flutter-tools.nvim.
I am reinstall devtools and works, but LSP not yet
from flutter-tools.nvim.
@tredeneo I'm away from my computer right now (on mobile). How have you got flutter set up. It's it in your PATH how did you install it? If you use falls dartls from nvim config on it's own does that work?
from flutter-tools.nvim.
with dartls also not works
directory flutter on windows(where)
C:\flutter\bin\flutter
C:\flutter\bin\flutter.bat
directory flutter on linux(whereis)
flutter: /snap/bin/flutter.openurl
/snap/bin/flutter.dart
/snap/bin/flutter
after create issue, I have installed dart-sdk(also not works)
directory dart on linux(whereis)
dart: /usr/bin/dart
/usr/lib/dart
/usr/lib/dart/bin/dart
/snap/bin/dart
directory dart on windows(where)
C:\flutter\bin\dart
C:\flutter\bin\dart.bat
C:\tools\dart-sdk\bin\dart.exe
linux PATH
/usr/lib/dart/bin/
/home/tredeneo/.local/bin/
/home/tredeneo/.cargo/bin/
/snap/bin/
/usr/local/sbin
/usr/local/bin
/usr/local/games
/usr/sbin
/usr/bin
/usr/games
/sbin
/bin
windows PATH
C:\Program Files\PowerShell\7;C:\Python39\Scripts;C:\Python39;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\flutter\bin;C:\Program Files\PowerShell\7;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\Users\daniel\AppData\Local\Microsoft\WindowsApps;C:\Users\daniel\AppData\Local\Programs\Microsoft VS Code\bin;C:\tools\neovim\Neovim\bin;C:\tools\dart-sdk\bin;C:\Users\daniel\AppData\Roaming\Pub\Cache\bin
obs:
others LSP works(clangd,rls,rust_analyzer)
":FlutterDevices",":FlutterRun" works
from flutter-tools.nvim.
@tredeneo did you manage to get it working? I'm hoping to add instructions for things like snap
to the readme
from flutter-tools.nvim.
I add $HOME/snap/flutter/common/flutter/bin
to PATH
, and remove flutter link from /snap/bin/
(or rename for "any name")
on windows, not worked I think because flutter was on root directory('C:\'), $User\Documents\flutter
works
from flutter-tools.nvim.
I made it work in windows by changing this part in lua/flutter-tools/executable.lua
to
local M = {
dart_bin_name = "dart.bat",
}
Virtual Texts, Diagnostics, Completions and outlines, all work!
from flutter-tools.nvim.
@luiq54 is the dart.bat
bit necessary for all Windows users or just your setup? I haven't had other Windows users complain as far as I know, so I don't really know if I can safely change that for all Windows users or if it will break a lot of other people's setups
from flutter-tools.nvim.
The bin
folder in flutter sdk has these files
dart
and flutter
are bash scripts while other two are windows batch files. It think it is necessary to use dart.bat
in windows.
(I haven't seen a single windows issue except this one so I am very skeptical)
from flutter-tools.nvim.
Related Issues (20)
- [Question] Is there a way to setup the flutter-tools lsp to `autostart`? HOT 4
- Question: Multiple devices HOT 1
- [BUG] Chrome device not listed
- Configuring the color of widget lines HOT 1
- Freezes when empty function exists HOT 4
- [BUG] Debugger crashes when breakpoint exists HOT 2
- [BUG] Syntax highlighting not working immediately HOT 3
- [BUG] Hot reloading does not work on save HOT 1
- LSP not found HOT 1
- [feature] set `flutterMode` from .nvim.lua config file HOT 1
- How to configure launch flavor with arguments (args)?
- 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
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.