trying to make flutter work with nvim
This commit is contained in:
@@ -5,8 +5,8 @@ alias la='ls -A'
|
||||
alias l='ls -CF'
|
||||
alias lg='lazygit'
|
||||
|
||||
export HOME=/home/talksik
|
||||
export PATH=/usr/local/go/bin:$PATH:~/Qt/5.15.14/gcc_64/bin/:~:~/go/bin:~/code/flutter/bin:$HOME/.local/bin:$HOME/code/flutter-elinux/bin/:$HOME/.pub-cache/bin
|
||||
export HOME=/home/talksik export PATH=/usr/local/go/bin:$PATH:~/Qt/5.15.14/gcc_64/bin/:~:~/go/bin:~/code/flutter/bin:$HOME/.local/bin:$HOME/code/flutter-elinux/bin/:$HOME/.pub-cache/bin:$HOME/.nb
|
||||
|
||||
export QMAKE=~/Qt/5.15.14/gcc_64/bin
|
||||
# needed so that gstreamer building from source can reference Qt installation
|
||||
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:~/Qt/5.15.14/gcc_64/lib/pkgconfig/:/usr/lib/x86_64-linux-gnu/pkgconfig/
|
||||
@@ -42,4 +42,4 @@ lfcd() {
|
||||
done
|
||||
}
|
||||
|
||||
export NB_EDITOR=nvim
|
||||
alias today='$HOME/.nb/today.sh'
|
||||
|
||||
@@ -1 +1,21 @@
|
||||
require("flutter-tools").setup {} -- use defaults
|
||||
-- run command `flutter sdk-path` to get the path and set to variable
|
||||
|
||||
local function execute_command(command)
|
||||
local handle = io.popen(command)
|
||||
local result = handle:read("*a")
|
||||
handle:close()
|
||||
return result
|
||||
end
|
||||
|
||||
-- Run the "flutter sdk-path" command and capture its output
|
||||
local flutterSdkPath = execute_command("flutter sdk-path")
|
||||
|
||||
local flutterExecutable = flutterSdkPath:match("^(.-)%s*$") .. "/bin/flutter"
|
||||
local dartExecutable = flutterSdkPath:match("^(.-)%s*$") .. "/bin/dart"
|
||||
|
||||
-- concatenate
|
||||
print("Flutter executable path: " .. flutterExecutable)
|
||||
|
||||
require("flutter-tools").setup {
|
||||
flutter_path = flutterExecutable,
|
||||
} -- use defaults
|
||||
|
||||
@@ -4,6 +4,7 @@ local lsp_config = require('lspconfig')
|
||||
lsp.preset("recommended")
|
||||
|
||||
lsp.ensure_installed({
|
||||
dart
|
||||
})
|
||||
|
||||
-- set client offset encoding for clang
|
||||
|
||||
Reference in New Issue
Block a user