Add flutter-tools neovim plugin
parent
610563bde4
commit
11a9ac9f30
|
@ -24,8 +24,8 @@ return require('packer').startup {
|
|||
-- use { 'Shougo/vimproc.vim', run = 'make' } -- Not really used
|
||||
use 'vim-scripts/utl.vim' -- Universal text linking
|
||||
use { --
|
||||
'mbbill/undotree', --
|
||||
cmd = 'UndotreeToggle' --
|
||||
'mbbill/undotree', --
|
||||
cmd = 'UndotreeToggle' --
|
||||
} -- Undos in a tree for easy access
|
||||
use 'mhinz/vim-grepper' -- Grepper command - improved grepping throughout project
|
||||
use 'radenling/vim-dispatch-neovim' -- vim-dispatch for neovim - uses terminal
|
||||
|
@ -61,19 +61,22 @@ return require('packer').startup {
|
|||
|
||||
-- Treesitter --
|
||||
use { --
|
||||
'nvim-treesitter/nvim-treesitter', --
|
||||
run = ':TSUpdate' --
|
||||
'nvim-treesitter/nvim-treesitter', --
|
||||
run = ':TSUpdate' --
|
||||
} -- Treesitter integration
|
||||
use 'nvim-treesitter/playground' -- TSPlaygroundToggle - access treesitter data
|
||||
|
||||
-- LSP --
|
||||
use 'tjdevries/nlua.nvim' -- Built-in Lua integration with LSP
|
||||
use 'neovim/nvim-lspconfig' -- Easy LSP Config
|
||||
use 'alexaandru/nvim-lspupdate' -- Easy install and update for many LSP servers
|
||||
use 'nvim-lua/completion-nvim' -- LSP completion integration
|
||||
use 'nvim-treesitter/completion-treesitter' -- Treesitter completion integration
|
||||
use 'nvim-lua/lsp_extensions.nvim' -- LSP extensions (like closing labels for Dart)
|
||||
|
||||
-- LSP language specific
|
||||
use 'tjdevries/nlua.nvim' -- Built-in Lua integration with LSP
|
||||
use 'akinsho/flutter-tools.nvim' -- Additional flutter integrations
|
||||
|
||||
-- Lua support --
|
||||
use 'tjdevries/astronauta.nvim' -- Support for lua ftplugins and plugins
|
||||
use 'nvim-lua/popup.nvim' -- Popup API integration - needed for some plugins
|
||||
|
|
|
@ -12,7 +12,7 @@ local on_attach = function(client, bufnr)
|
|||
|
||||
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||
|
||||
default_opts = {noremap = true, silent = true}
|
||||
local default_opts = {noremap = true, silent = true}
|
||||
|
||||
-- Lsp keymaps
|
||||
buf_set_keymap('n', '<C-]>', '<cmd>lua vim.lsp.buf.definition()<CR>', default_opts)
|
||||
|
@ -25,14 +25,14 @@ local on_attach = function(client, bufnr)
|
|||
buf_set_keymap('n', '<Leader>ac', '<cmd>lua vim.lsp.buf.code_action()<CR>', default_opts)
|
||||
buf_set_keymap('n', '<Leader>a', '<cmd>lua vim.lsp.buf.code_action_range()<CR>', default_opts)
|
||||
|
||||
completion_opts = {silent = true}
|
||||
local completion_opts = {silent = true}
|
||||
|
||||
-- Completion keymaps
|
||||
buf_set_keymap('i', '<C-n>', '<Plug>(completion_trigger)', completion_opts)
|
||||
end
|
||||
|
||||
-- Lsp default language servers
|
||||
local servers = { "bashls", "clangd", "dartls", "jsonls", "pyright", "rust_analyzer", "kotlin_language_server", "vimls" }
|
||||
local servers = { "bashls", "clangd", "jsonls", "pyright", "rust_analyzer", "kotlin_language_server", "vimls" }
|
||||
for _, lsp in ipairs(servers) do
|
||||
lspconfig[lsp].setup { on_attach = on_attach }
|
||||
end
|
||||
|
@ -42,6 +42,12 @@ require('nlua.lsp.nvim').setup(lspconfig, {
|
|||
on_attach = on_attach,
|
||||
|
||||
-- Include globals you want to tell the LSP are real :)
|
||||
globals = {
|
||||
}
|
||||
globals = {}
|
||||
})
|
||||
|
||||
-- Flutter tools
|
||||
require('flutter-tools').setup {
|
||||
lsp = {
|
||||
on_attach = on_attach
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue