Coder Social home page Coder Social logo

Comments (9)

akinsho avatar akinsho commented on May 13, 2024 1

@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.

tredeneo avatar tredeneo commented on May 13, 2024

I am reinstall devtools and works, but LSP not yet

from flutter-tools.nvim.

akinsho avatar akinsho commented on May 13, 2024

@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.

tredeneo avatar tredeneo commented on May 13, 2024

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.

akinsho avatar akinsho commented on May 13, 2024

@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.

tredeneo avatar tredeneo commented on May 13, 2024

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.

mystchonky avatar mystchonky commented on May 13, 2024

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.

akinsho avatar akinsho commented on May 13, 2024

@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.

mystchonky avatar mystchonky commented on May 13, 2024

The bin folder in flutter sdk has these files
image
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)

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.