diff --git a/symlinks/config/nvim/lua/init/plugins.lua b/symlinks/config/nvim/lua/init/plugins.lua index b0e3f7c..1753b20 100644 --- a/symlinks/config/nvim/lua/init/plugins.lua +++ b/symlinks/config/nvim/lua/init/plugins.lua @@ -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 diff --git a/symlinks/config/nvim/lua/lsp/servers.lua b/symlinks/config/nvim/lua/lsp/servers.lua index 07a30f8..cf0d291 100644 --- a/symlinks/config/nvim/lua/lsp/servers.lua +++ b/symlinks/config/nvim/lua/lsp/servers.lua @@ -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', '', 'lua vim.lsp.buf.definition()', default_opts) @@ -25,14 +25,14 @@ local on_attach = function(client, bufnr) buf_set_keymap('n', 'ac', 'lua vim.lsp.buf.code_action()', default_opts) buf_set_keymap('n', 'a', 'lua vim.lsp.buf.code_action_range()', default_opts) - completion_opts = {silent = true} + local completion_opts = {silent = true} -- Completion keymaps buf_set_keymap('i', '', '(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 + } +}