commit 67a4cac14345f35642b91a9ee544a2dd5fbad9d3
parent ecf2bcf4b7e0fd4b11deaddce833de2a01c4c2bf
Author: Tomas Nemec <nemi@skaut.cz>
Date: Mon, 11 Apr 2022 11:46:03 +0200
update
Diffstat:
9 files changed, 234 insertions(+), 204 deletions(-)
diff --git a/after/plugin/cmp.lua b/after/plugin/cmp.lua
@@ -0,0 +1,27 @@
+if not pcall(require, 'cmp') then return end
+
+local cmp = require('cmp')
+require('cmp_dictionary').setup({ dic = {} })
+-- cmp.register_source('exe', require('tms.p.cmp.exe_source').new())
+
+cmp.setup({
+ documentation = { border = 'single' },
+ snippet = { expand = function(args) require('luasnip').lsp_expand(args.body) end },
+ mapping = {
+ ['<c-space>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }),
+ ['<c-e>'] = cmp.mapping({ i = cmp.mapping.abort(), c = cmp.mapping.close() }),
+ ['<cr>'] = cmp.mapping.confirm({ select = true }),
+ ['<c-y>'] = cmp.mapping.confirm({ select = true }),
+ ['<c-o>'] = cmp.mapping.confirm({ select = true }),
+ ['<c-f>'] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }),
+ ['<c-d>'] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }),
+ },
+ sources = cmp.config.sources({ { name = 'nvim_lsp' }, { name = 'nvim_lua' }, { name = 'luasnip' }, { name = 'path' } }, {
+ { name = 'buffer' },
+ { name = 'spell' },
+ { name = 'calc' },
+ { name = 'treesitter' },
+ { name = 'dictionary' },
+ }),
+ experimental = { ghost_text = true },
+})
diff --git a/after/plugin/luasnip.lua b/after/plugin/luasnip.lua
@@ -0,0 +1,105 @@
+if not pcall(require, 'luasnip') then
+ return
+end
+
+local ls = require('luasnip')
+local types = require('luasnip.util.types')
+
+ls.config.set_config({
+ history = true,
+ updateevents = 'TextChanged,TextChangedI',
+ ext_opts = {
+ [types.choiceNode] = {
+ active = {
+ virt_text = {
+ { '<- choice', 'Comment' },
+ },
+ },
+ },
+ },
+})
+
+local opts = { silent = true }
+vim.keymap.set({ 'i', 's' }, '<c-l>', function() if ls.expand_or_jumpable() then ls.expand_or_jump() end end, opts)
+vim.keymap.set({ 'i', 's' }, '<c-h>', function() if ls.jumpable(-1) then ls.jump(-1) end end, opts)
+vim.keymap.set({ 'i' }, '<c-e>', function() if ls.choice_active() then ls.change_choice(1) end end, opts)
+vim.keymap.set({ 'i' }, '<c-u>', require('luasnip.extras.select_choice'), opts)
+
+local s = ls.snippet
+local sn = ls.snippet_node
+local isn = ls.indent_snippet_node
+local t = ls.text_node
+local i = ls.insert_node
+local f = ls.function_node
+local c = ls.choice_node
+local d = ls.dynamic_node
+local r = ls.restore_node
+local events = require("luasnip.util.events")
+local ai = require("luasnip.nodes.absolute_indexer")
+local p = require('luasnip.extras').partial
+local rep = require('luasnip.extras').rep
+local fmt = require('luasnip.extras.fmt').fmt
+
+local function shell(_, _, command)
+ local file = io.popen(command, 'r')
+ local res = {}
+ for line in file:lines() do table.insert(res, line) end
+ return res
+end
+
+ls.cleanup()
+
+ls.add_snippets("all", {
+ s('bang', t('#!/usr/bin/env ')),
+ s('date', p(os.date, '%d.%m.%Y')),
+ s('time', p(os.date, '%H:%M:%S')),
+ s('todo', {
+ f(function(_, _, _) return require('luasnip.util.util').buffer_comment_chars()[1] end, {}),
+ t(' TODO('),
+ f(shell, {}, 'id -un'),
+ t(') '),
+ p(os.date, '%d.%m.%y'),
+ t(': '),
+ }),
+})
+
+ls.add_snippets("lua", {
+ s('f', fmt('function() {} end', { i(1) })),
+ s('r', fmt('require(\'{}\')', { i(1) })),
+ s('l', fmt('local {} = {}', { i(1), i(2) })),
+ s('lr', fmt('local {} = require(\'{}\')', { i(1), rep(1) })),
+})
+
+
+ls.add_snippets("dart", {
+ s('s', fmt('String {}{}', { i(1), i(2, ';') })),
+ s('sn', fmt('String? {}{}', { i(1), i(2, ';') })),
+ s('i', fmt('int {}{}', { i(1), i(2, ';') })),
+ s('in', fmt('int? {}{}', { i(1), i(2, ';') })),
+ s('n', fmt('num {}{}', { i(1), i(2, ';') })),
+ s('nn', fmt('num? {}{}', { i(1), i(2, ';') })),
+ s('d', fmt('double {}{}', { i(1), i(2, ';') })),
+ s('dn', fmt('double? {}{}', { i(1), i(2, ';') })),
+ s('D', fmt('dynamic {}{}', { i(1), i(2, ';') })),
+ s('f', fmt('final {}{}', { i(1), i(2, ';') })),
+ s('v', fmt('var {}{}', { i(1), i(2, ';') })),
+ s('for', fmt([[
+ for (final {} in {}) {{
+ {}
+ }}
+ ]], { i(1), i(2), i(3) })),
+})
+
+-- Angular
+ls.add_snippets("html", {
+ s('if', fmt('*ngIf="{}"', { i(1) })),
+ s('nf', fmt('*ngFor="let {} of {}"', { i(1), i(2) })),
+ s('nfi', fmt('*ngFor="let {} of {}; let i=index"', { i(1), i(2) })),
+ s('ni', fmt('[{}]="{}"', { i(1), i(2) })),
+ s('no', fmt('({})="{}"', { i(1), i(2) })),
+ s('nb', fmt('[({})]="{}"', { i(1), i(2) })),
+})
+
+ls.add_snippets("scss", {
+ s('v', fmt('var(--{})', { i(1) }))
+})
diff --git a/ftplugin/dart.lua b/ftplugin/dart.lua
@@ -20,5 +20,3 @@ if vim.fn.getline(1):match('^#!.*dcli') then
else
vim.cmd [[comp dart]]
end
-
--- require('tms.p.cmp').enable_autocomplete()
diff --git a/lua/tms/lsp/init.lua b/lua/tms/lsp/init.lua
@@ -3,33 +3,33 @@ local servers = require('tms.lsp.servers')
local M = {}
local keybind = function(client, bufnr)
- vim.keymap.set('n', 'gd', vim.lsp.buf.definition, {silent = true, buffer = bufnr})
- vim.keymap.set('n', 'gD', '<cmd>vsplit | lua vim.lsp.buf.definition()<cr>', {silent = true, buffer = bufnr})
- vim.keymap.set('n', 'gT', vim.lsp.buf.type_definition, {silent = true, buffer = bufnr})
- vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, {silent = true, buffer = bufnr})
- vim.keymap.set('n', 'K', vim.lsp.buf.hover, {silent = true, buffer = bufnr})
- vim.keymap.set('n', '<c-p>', vim.lsp.buf.signature_help, {silent = true, buffer = bufnr})
- vim.keymap.set('i', '<c-p>', vim.lsp.buf.signature_help, {silent = true, buffer = bufnr})
- vim.keymap.set('n', 'gr', vim.lsp.buf.references, {silent = true, buffer = bufnr})
- vim.keymap.set('n', 'ga', vim.lsp.buf.code_action, {silent = true, buffer = bufnr})
- vim.keymap.set('n', 'gn', vim.lsp.buf.rename, {silent = true, buffer = bufnr})
+ vim.keymap.set('n', 'gd', vim.lsp.buf.definition, { silent = true, buffer = bufnr })
+ vim.keymap.set('n', 'gD', '<cmd>vsplit | lua vim.lsp.buf.definition()<cr>', { silent = true, buffer = bufnr })
+ vim.keymap.set('n', 'gT', vim.lsp.buf.type_definition, { silent = true, buffer = bufnr })
+ vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, { silent = true, buffer = bufnr })
+ vim.keymap.set('n', 'K', vim.lsp.buf.hover, { silent = true, buffer = bufnr })
+ vim.keymap.set('n', '<c-p>', vim.lsp.buf.signature_help, { silent = true, buffer = bufnr })
+ vim.keymap.set('i', '<c-p>', vim.lsp.buf.signature_help, { silent = true, buffer = bufnr })
+ vim.keymap.set('n', 'gr', vim.lsp.buf.references, { silent = true, buffer = bufnr })
+ vim.keymap.set('n', 'ga', vim.lsp.buf.code_action, { silent = true, buffer = bufnr })
+ vim.keymap.set('n', 'gn', vim.lsp.buf.rename, { silent = true, buffer = bufnr })
-- Formatting
if client.resolved_capabilities.document_formatting == true then
- vim.keymap.set('n', 'Q', vim.lsp.buf.formatting, {silent = true, buffer = bufnr})
- vim.keymap.set('v', 'Q', vim.lsp.buf.range_formatting, {silent = true, buffer = bufnr})
+ vim.keymap.set('n', 'Q', vim.lsp.buf.formatting, { silent = true, buffer = bufnr })
+ vim.keymap.set('v', 'Q', vim.lsp.buf.range_formatting, { silent = true, buffer = bufnr })
end
-- symbols
local t = require('tms.p.telescope')
- vim.keymap.set('n', 'gm', t.lsp_document_symbols, {silent = true, buffer = bufnr})
- vim.keymap.set('n', 'gM', t.b.lsp_dynamic_workspace_symbols, {silent = true, buffer = bufnr})
+ vim.keymap.set('n', 'gm', t.lsp_document_symbols, { silent = true, buffer = bufnr })
+ vim.keymap.set('n', 'gM', t.b.lsp_dynamic_workspace_symbols, { silent = true, buffer = bufnr })
end
local attach_callbacks = {}
local on_attach = function(client, bufnr)
local lsp = vim.lsp
- lsp.handlers['textDocument/hover'] = lsp.with(lsp.handlers.hover, {border = 'single'})
- lsp.handlers['textDocument/signatureHelp'] = lsp.with(lsp.handlers.signature_help, {border = 'single'})
+ lsp.handlers['textDocument/hover'] = lsp.with(lsp.handlers.hover, { border = 'single' })
+ lsp.handlers['textDocument/signatureHelp'] = lsp.with(lsp.handlers.signature_help, { border = 'single' })
if client.resolved_capabilities.goto_definition then
vim.api.nvim_buf_set_option(bufnr, 'tagfunc', 'v:lua.vim.lsp.tagfunc')
end
@@ -75,6 +75,7 @@ M.setup = function()
server:setup(o)
vim.cmd [[ do User LspAttachBuffers ]]
end
+
local opts = {}
opts.on_attach = on_attach
opts.capabilities = capabilities()
@@ -83,7 +84,7 @@ M.setup = function()
end)
-- Manual install
- local manual_servers = {'gdscript', 'dartls'}
+ local manual_servers = { 'gdscript', 'dartls' }
for _, name in ipairs(manual_servers) do add_server(name) end
require('tms.p.zk').setup(server_opts('zk'))
end
diff --git a/lua/tms/lsp/servers.lua b/lua/tms/lsp/servers.lua
@@ -8,59 +8,122 @@ M.setup = function(name, opts, server)
end
M.jsonls = function(opts)
- opts.settings = {json = {schemas = require('schemastore').json.schemas()}}
+ opts.settings = {
+ json = {
+ schemas = require('schemastore').json
+ .schemas(),
+ },
+ }
return opts
end
M.yamlls = function(opts)
- opts.settings = {yaml = {schemaStore = {enable = true}}}
+ opts.settings = {
+ yaml = {
+ schemaStore = { enable = true },
+ },
+ }
return opts
end
M.cssls = function(opts)
- opts.capabilities.textDocument.completion.completionItem.snippetSupport = true
+ opts.capabilities.textDocument
+ .completion.completionItem
+ .snippetSupport = true
return opts
end
M.sumneko_lua = function(opts, server)
opts.settings = {
- Lua = {runtime = {version = 'LuaJIT'}, diagnostics = {globals = {'vim'}}, telemetry = {enable = false}},
+ Lua = {
+ runtime = { version = 'LuaJIT' },
+ diagnostics = { globals = { 'vim' } },
+ telemetry = { enable = false },
+ format = {
+ enable = true,
+ defaultConfig = {
+ indent_style = 'space',
+ indent_size = '2',
+ quote_style = 'single',
+ call_arg_parentheses = 'keep',
+ continuation_indent_size = '4',
+ local_assign_continuation_align_to_first_expression = true,
+ align_call_args = true,
+ align_function_define_params = true,
+ keep_one_space_between_table_and_bracket = true,
+ align_table_field_to_first_field = true,
+ continuous_assign_statement_align_to_equal_sign = true,
+ continuous_assign_table_field_align_to_equal_sign = true,
+ if_condition_no_continuation_indent = false,
+ end_of_line = 'lf',
+ },
+ },
+ },
}
- opts = vim.tbl_deep_extend('force', server:get_default_options(), opts)
- opts = require('lua-dev').setup({lspconfig = opts})
+ opts = vim.tbl_deep_extend('force',
+ server:get_default_options(),
+ opts)
+ opts = require('lua-dev').setup({
+ lspconfig = opts,
+ })
return opts
end
M.emmet_ls = function(opts)
- opts.root_dir = require('lspconfig').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 = require('lspconfig').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.html = function(opts)
- opts.init_options = {provideFormatter = false}
+ opts.init_options = {
+ provideFormatter = false,
+ }
return opts
end
M.dartls = function(opts)
opts.cmd = require('tms.ft.dart.bin').lsp_cmd()
- opts.init_options = {closingLabels = true, outline = true}
+ 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 = require('lspconfig').util.root_pattern('pubspec.yaml', '.git', vim.fn.getcwd())
+ 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 = require('lspconfig').util
+ .root_pattern('pubspec.yaml',
+ '.git',
+ vim.fn.getcwd())
return opts
end
M.intelephense = function(opts)
opts.init_options = {
clearCache = true,
- licenceKey = os.getenv('XDG_CONFIG_HOME') .. '/intelephense/licenceKey.txt',
- globalStoragePath = os.getenv('XDG_CONFIG_HOME') .. '/intelephense',
+ licenceKey = os.getenv(
+ 'XDG_CONFIG_HOME') ..
+ '/intelephense/licenceKey.txt',
+ globalStoragePath = os.getenv(
+ 'XDG_CONFIG_HOME') ..
+ '/intelephense',
}
return opts
end
diff --git a/lua/tms/p/cmp/init.lua b/lua/tms/p/cmp/init.lua
@@ -1,61 +0,0 @@
-local M = {}
-
-local setup_sources = function()
- require('cmp_dictionary').setup({dic={}})
- require('cmp').register_source('exe', require('tms.p.cmp.exe_source').new())
- -- require('cmp').register_source('glab_dpgw', require('tms.p.cmp.glab_source').new())
-end
-
-M.setup = function()
- setup_sources()
- local cmp = require('cmp')
-
- cmp.setup({
- -- completion = {autocomplete = false},
- documentation = {border = 'single'},
- snippet = {expand = function(args) require('luasnip').lsp_expand(args.body) end},
- mapping = {
- ['<C-Space>'] = cmp.mapping.complete({reason = cmp.ContextReason.Auto}),
- ['<C-u>'] = cmp.mapping.scroll_docs(-4),
- ['<C-d>'] = cmp.mapping.scroll_docs(4),
- ['<C-e>'] = cmp.mapping.close(),
- ['<C-y>'] = cmp.mapping.confirm({behavior = cmp.ConfirmBehavior.Replace, select = true}),
- ['<C-o>'] = cmp.mapping.confirm({behavior = cmp.ConfirmBehavior.Replace, select = true}),
- ['<Left>'] = cmp.mapping.close(),
- ['<Down>'] = cmp.mapping.select_next_item(),
- ['<Up>'] = cmp.mapping.select_prev_item(),
- ['<Right>'] = cmp.mapping.confirm({select = true}),
- },
- sources = cmp.config.sources({
- {name = 'nvim_lsp'},
- {name = 'nvim_lua'},
- {name = 'luasnip'},
- {name = 'path'},
- {name = 'buffer', keyword_length = 5},
- {name = 'spell'},
- {name = 'calc'},
- {name = 'treesitter'},
- {name = 'dictionary'},
- }),
- experimental = {ghost_text = true},
- })
-
- -- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
- -- cmp.setup.cmdline('/', {completion = {autocomplete = {cmp.TriggerEvent.TextChanged}}, sources = {{name = 'buffer'}}})
-
- -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
- -- cmp.setup.cmdline(':', {
- -- completion = {autocomplete = {cmp.TriggerEvent.TextChanged}},
- -- sources = cmp.config.sources({{name = 'path'}}, {{name = 'cmdline'}}),
- -- })
-
-end
-
-M.disable_autocomplete = function() require('cmp').setup.buffer {completion = {autocomplete = false}} end
-
-M.enable_autocomplete = function()
- local cmp = require('cmp')
- cmp.setup.buffer {completion = {autocomplete = {cmp.TriggerEvent.TextChanged}}}
-end
-
-return M
diff --git a/lua/tms/p/luasnip.lua b/lua/tms/p/luasnip.lua
@@ -1,102 +0,0 @@
----@diagnostic disable: unused-local, unused-function
-local M = {}
-
-local keymaps = function(luasnip)
- vim.keymap.set('i', '<C-l>', function() if luasnip.expand_or_jumpable() then luasnip.expand_or_jump() end end,
- {noremap = true})
- vim.keymap.set('s', '<C-l>', function() if luasnip.expand_or_jumpable() then luasnip.expand_or_jump() end end,
- {noremap = true})
- vim.keymap.set('i', '<C-h>', function() if luasnip.jumpable(-1) then luasnip.jump(-1) end end, {noremap = true})
- vim.keymap.set('s', '<C-h>', function() if luasnip.jumpable(-1) then luasnip.jump(-1) end end, {noremap = true})
- vim.keymap.set('i', '<C-e>', function() if luasnip.choice_active() then luasnip.change_choice(1) end end,
- {silent = true, noremap = true})
- vim.keymap.set('s', '<C-e>', function() if luasnip.choice_active() then luasnip.change_choice(1) end end,
- {silent = true, noremap = true})
- -- vim.api.nvim_set_keymap("i", "<C-E>", "<Plug>luasnip-next-choice", {})
- -- vim.api.nvim_set_keymap("s", "<C-E>", "<Plug>luasnip-next-choice", {})
-end
-
-local function copy(args) return args[1] end
--- Make sure to not pass an invalid command, as io.popen() may write over nvim-text.
-
-local function bash(_, _, command)
- local file = io.popen(command, 'r')
- local res = {}
- for line in file:lines() do table.insert(res, line) end
- return res
-end
-
-local snippets = function(luasnip)
- local ls = luasnip
- local s = ls.snippet
- local sn = ls.snippet_node
- local isn = ls.indent_snippet_node
- local t = ls.text_node
- local i = ls.insert_node
- local f = ls.function_node
- local c = ls.choice_node
- local d = ls.dynamic_node
- local events = require('luasnip.util.events')
- local l = require('luasnip.extras').lambda
- local p = require('luasnip.extras').partial
- local fmt = require('luasnip.extras.fmt').fmt
- ls.snippets = {
- all = {
- s('bang', t('#!/usr/bin/env ')),
- s('date', p(os.date, '%d.%m.%Y')),
- s('time', p(os.date, '%H:%M:%S')),
- s('todo', {
- f(function(_, _, _) return require('luasnip.util.util').buffer_comment_chars()[1] end, {}),
- t(' TODO('),
- f(bash, {}, 'id -un'),
- t(') '),
- p(os.date, '%d.%m.%y'),
- t(': '),
- }),
- },
- html = {
- s('if', fmt('*ngIf="{1}"', {i(1)})),
- s('nf', fmt('*ngFor="let {1} of {2}"', {i(1), i(2)})),
- s('nfi', fmt('*ngFor="let {1} of {2}; let i=index"', {i(1), i(2)})),
- s('ni', fmt('[{1}]="{2}"', {i(1), i(2)})),
- s('no', fmt('({1})="{2}"', {i(1), i(2)})),
- s('nb', fmt('[({1})]="{2}"', {i(1), i(2)})),
- },
- lua = {
- s('f', fmt('function() {1} end', {i(1)})),
- s('r', fmt('require(\'{1}\')', {i(1)})),
- s('l', fmt('local {1} = {2}', {i(1), i(2)})),
- },
- dart = {
- s('s', fmt('String {1}{2}', {i(1), i(2, ';')})),
- s('S', fmt('String? {1}{2}', {i(1), i(2, ';')})),
- s('i', fmt('int {1}{2}', {i(1), i(2, ';')})),
- s('I', fmt('int? {1}{2}', {i(1), i(2, ';')})),
- s('n', fmt('num {1}{2}', {i(1), i(2, ';')})),
- s('N', fmt('num? {1}{2}', {i(1), i(2, ';')})),
- s('d', fmt('double {1}{2}', {i(1), i(2, ';')})),
- s('D', fmt('double? {1}{2}', {i(1), i(2, ';')})),
- s('f', fmt('final {1}{2}', {i(1), i(2, ';')})),
- s('v', fmt('var {1}{2}', {i(1), i(2, ';')})),
- s('for', fmt([[
- for (final {2} in {1}) {{
- {3}
- }}
- ]], {i(1), i(2), i(3)})),
- },
- scss = {s('v', fmt('var(--{1})', {i(1)}))},
- }
-end
-
-M.setup = function()
- local luasnip = require('luasnip')
- local types = require('luasnip.util.types')
- luasnip.config.set_config({
- store_selection_keys = '<Tab>',
- ext_opts = {[types.choiceNode] = {active = {virt_text = {{'choiceNode', 'Comment'}}}}},
- })
- keymaps(luasnip)
- snippets(luasnip)
-end
-
-return M
diff --git a/lua/tms/p/nullls.lua b/lua/tms/p/nullls.lua
@@ -43,7 +43,7 @@ M.setup = function()
'$FILENAME',
}, '--range-start', '--range-end'),
},
- builtins.formatting.lua_format,
+ -- builtins.formatting.lua_format,
-- builtins.formatting.clang_format,
builtins.formatting.shfmt.with {
filetypes = {'sh', 'zsh'},
diff --git a/lua/tms/plugins.lua b/lua/tms/plugins.lua
@@ -293,9 +293,9 @@ return packer.startup({
requires = {'nvim-lua/plenary.nvim'},
config = function()
require('rest-nvim').setup()
- vim.api.nvim_create_user_command('Rest', require('rest-nvim').run)
- vim.api.nvim_create_user_command('RestPreview', function() require('rest-nvim').run(true) end)
- vim.api.nvim_create_user_command('RestLast', require('rest-nvim').last)
+ vim.api.nvim_create_user_command('Rest', require('rest-nvim').run, {})
+ vim.api.nvim_create_user_command('RestPreview', function() require('rest-nvim').run(true) end, {})
+ vim.api.nvim_create_user_command('RestLast', require('rest-nvim').last, {})
end,
}
@@ -311,7 +311,7 @@ return packer.startup({
use {'dart-lang/dart-vim-plugin', ft = {'dart'}}
-- snippets
- use {'L3MON4D3/LuaSnip', config = function() require('tms.p.luasnip').setup() end}
+ use {'L3MON4D3/luaSnip'}
-- completion
use {
@@ -328,7 +328,6 @@ return packer.startup({
'uga-rosa/cmp-dictionary',
'saadparwaiz1/cmp_luasnip',
},
- config = function() require('tms.p.cmp').setup() end,
}
-- ui
@@ -419,7 +418,7 @@ return packer.startup({
}
require('tms.p.treesitter').setup()
-- hack
- vim.api.nvim_create_user_command('TSHRefresh', 'write|TSBufEnable highlight')
+ vim.api.nvim_create_user_command('TSHRefresh', 'write|TSBufEnable highlight', {})
vim.keymap.set('n', '<leader>su', '<cmd>TSHRefresh<cr>', {noremap = true})
end,
}