neovim

Personal neovim configuration files
git clone git://gtms.dev/neovim.git
Log | Files | Refs

commit 221ab3a121d05b1b3ec049060352c35381f56243
parent 5f91192c17a80c0ada60d623eefa7aa47008b458
Author: Tomas Nemec <nemi@skaut.cz>
Date:   Mon, 29 Nov 2021 12:39:54 +0100

update

Diffstat:
Mlua/tms/lsp/servers.lua | 19++++++-------------
Mlua/tms/p/aerial.lua | 4+---
Mlua/tms/plugins.lua | 34+++++++++++++++++++++-------------
3 files changed, 28 insertions(+), 29 deletions(-)

diff --git a/lua/tms/lsp/servers.lua b/lua/tms/lsp/servers.lua @@ -1,6 +1,4 @@ -- Custom configuration for servers -local lspc = require('lspconfig') - local M = {} M.setup = function(name, opts) @@ -12,7 +10,7 @@ end -- Servers M.emmet_ls = function(opts) - opts.root_dir = lspc.util.root_pattern('.git', vim.fn.getcwd()) + opts.root_dir = require('lspconfig').util.root_pattern('.git', vim.fn.getcwd()) return opts end @@ -21,31 +19,26 @@ M.efm = function(opts) opts.init_options = {documentFormatting = true} opts.settings = efm.settings opts.filetypes = efm.filetypes() - opts.root_dir = lspc.util.root_pattern('.git', vim.fn.getcwd()) + opts.root_dir = require('lspconfig').util.root_pattern('.git', vim.fn.getcwd()) return opts end M.gopls = function(opts) - opts.root_dir = lspc.util.root_pattern('go.mod', '.git', vim.fn.getcwd()) + opts.root_dir = require('lspconfig').util.root_pattern('go.mod', '.git', vim.fn.getcwd()) return opts end M.dartls = function(opts) - opts.cmd = require('tms.ft.dart.bin').lspcmd() + opts.cmd = require('tms.ft.dart.bin').require('lspconfig') + md() opts.init_options = {closingLabels = true, outline = true} -- filetypes = {'dart', 'html'} opts.settings = {dart = {lineLength = 120, showTodos = true, completeFunctionCalls = true}} opts.handlers = {['dart/textDocument/publishClosingLabels'] = require('tms.ft.dart.closing_labels').get_callback()} - opts.root_dir = lspc.util.root_pattern('pubspec.yaml', '.git', vim.fn.getcwd()) + opts.root_dir = require('lspconfig').util.root_pattern('pubspec.yaml', '.git', vim.fn.getcwd()) return opts end -M.gdscript = function(opts) return opts end - -M['null-ls'] = function(opts) return opts end - -M.sumneko_lua = function(opts) return opts end - M.intelephense = function(opts) opts.init_options = { clearCache = true, diff --git a/lua/tms/p/aerial.lua b/lua/tms/p/aerial.lua @@ -1,8 +1,6 @@ local M = {} M.setup = function() - vim.g.aerial = {highlight_on_jump = 0} - local aerial = require('aerial') aerial.register_attach_cb(function(bufnr) vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>r', '<cmd>AerialToggle!<CR>', {}) @@ -13,7 +11,7 @@ M.setup = function() end) require('telescope').load_extension('aerial') - require('tms.lsp').add_attach(function(client, bufnr) require('aerial').on_attach(client, bufnr) end) + -- require('tms.lsp').add_attach({fn = aerial.on_attach}) end return M diff --git a/lua/tms/plugins.lua b/lua/tms/plugins.lua @@ -33,7 +33,6 @@ return packer.startup({ -- cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done({map_char = {tex = ''}})) end, } - use {'JoosepAlviste/nvim-ts-context-commentstring'} use { 'numToStr/Comment.nvim', config = function() @@ -125,6 +124,7 @@ return packer.startup({ use 'chaoren/vim-wordmotion' -- word counts with _,.,-,... use { 'jandamm/cryoline.nvim', + after={'vim-fugitive'}, config = function() require('cryoline').config { ft = {fugitive = '%{FugitiveStatusline()}'}, @@ -320,13 +320,18 @@ return packer.startup({ use { disable = true, 'ThePrimeagen/refactoring.nvim', - requires = {'nvim-lua/plenary.nvim', 'nvim-treesitter/nvim-treesitter'}, + after={ 'nvim-treesitter'}, + requires = {'nvim-lua/plenary.nvim'}, config = function() require('tms.p.refactoring').setup() end, } -- lsp - use {'neovim/nvim-lspconfig', config = function() require('tms.lsp').setup() end} - use 'ii14/lsp-command' + use { + 'neovim/nvim-lspconfig', + after = {'nvim-lsp-installer', 'lua-dev.nvim', 'telescope.nvim'}, + config = function() require('tms.lsp').setup() end, + } + use {disable = true, 'ii14/lsp-command'} use 'williamboman/nvim-lsp-installer' use { 'folke/lsp-trouble.nvim', @@ -336,13 +341,14 @@ return packer.startup({ use {'folke/lua-dev.nvim'} use { 'jose-elias-alvarez/null-ls.nvim', - requires = {'nvim-lua/plenary.nvim', 'neovim/nvim-lspconfig'}, + after = {'nvim-lspconfig'}, + requires = {'nvim-lua/plenary.nvim' }, config = function() require('tms.p.nullls').setup() end, } use { 'stevearc/aerial.nvim', - after = {'telescope.nvim'}, - require = {'neovim/nvim-lspconfig'}, + after = {'telescope.nvim', 'nvim-treesitter'}, + setup = function() vim.g.aerial = {backends = {'lsp', 'treesitter'}, highlight_on_jump = 0} end, config = function() require('tms.p.aerial').setup() end, } -- use 'mfussenegger/nvim-jdtls' @@ -351,20 +357,21 @@ return packer.startup({ use {'mfussenegger/nvim-dap', config = function() require('tms.p.dap').setup() end} use { 'rcarriga/nvim-dap-ui', - requires = 'mfussenegger/nvim-dap', + after = {'nvim-dap'}, config = function() require('tms.p.dap').setup_ui() end, } use { disable = true, 'Pocco81/DAPInstall.nvim', + after={'nvim-dap'}, + requires = {'jbyuki/one-small-step-for-vimkind'}, config = function() local dap_install = require('dap-install') local dbg_list = require('dap-install.debuggers_list').debuggers for debugger, _ in pairs(dbg_list) do dap_install.config(debugger, {}) end end, - requires = {'jbyuki/one-small-step-for-vimkind', 'mfussenegger/nvim-dap'}, } - use {'theHamsta/nvim-dap-virtual-text', requires = {'mfussenegger/nvim-dap'}} + use {'theHamsta/nvim-dap-virtual-text', after = {'nvim-dap'}} -- treesitter use { @@ -384,9 +391,10 @@ return packer.startup({ vim.keymap.nnoremap {'<leader>su', '<cmd>TSHRefresh<cr>'} end, } - use 'nvim-treesitter/nvim-treesitter-textobjects' - use 'nvim-treesitter/nvim-treesitter-refactor' - use 'nvim-treesitter/playground' + use {'nvim-treesitter/nvim-treesitter-textobjects', after={'nvim-treesitter'}} + use {'nvim-treesitter/nvim-treesitter-refactor', after={'nvim-treesitter'}} + use {'nvim-treesitter/playground', after={'nvim-treesitter'}} + use {'JoosepAlviste/nvim-ts-context-commentstring', after={'nvim-treesitter'}} -- telescope use {