commit ef9aa7c102de899bb0397ca3ce99f445154f4247
parent 178691c13c99776c41798bbc477a0defc9a8464d
Author: Tomas Nemec <nemi@skaut.cz>
Date: Tue, 7 Mar 2023 17:19:02 +0100
update
Diffstat:
4 files changed, 25 insertions(+), 20 deletions(-)
diff --git a/after/plugin/ccc.lua b/after/plugin/ccc.lua
@@ -1,10 +0,0 @@
-if not pcall(require, 'ccc') then
- return
-end
-
-local ccc = require('ccc')
-local mapping = ccc.mapping
-
-ccc.setup({ highlighter = { auto_enable = false } })
-
-vim.keymap.set('n', '<C-c>', '<cmd>CccPick<cr>')
diff --git a/ftplugin/dart.lua b/ftplugin/dart.lua
@@ -24,6 +24,7 @@ end
vim.lsp.start(require'tms.lsp'.make_opts('dartls'))
vim.keymap.set('n', '<leader>ar', vim.cmd.make)
+vim.keymap.set('n', '<leader>at', vim.cmd.Trun)
if pcall(require, 'dart-tools') then
local dt_lsp = require('dart-tools.lsp')
diff --git a/lua/plugins.lua b/lua/plugins.lua
@@ -38,7 +38,6 @@ return packer.startup({
use 'mbbill/undotree'
-- use 'camspiers/Animate.vim'
use 'nvchad/nvim-colorizer.lua'
- use 'uga-rosa/ccc.nvim'
use 'rainbowhxch/beacon.nvim'
-- use 'Yggdroot/hiPairs'
use 'karb94/neoscroll.nvim'
@@ -131,7 +130,6 @@ return packer.startup({
use 'rcarriga/nvim-dap-ui'
use 'theHamsta/nvim-dap-virtual-text'
use 'mxsdev/nvim-dap-vscode-js'
- use { 'microsoft/vscode-js-debug', opt = true, run = 'npm install --legacy-peer-deps && npm run compile' }
-- treesitter
use 'nvim-treesitter/nvim-treesitter'
diff --git a/plugin/trun.lua b/plugin/trun.lua
@@ -165,25 +165,41 @@ vim.api.nvim_create_user_command('TrunDiagClear', function(opts)
end, autocomplete)
vim.api.nvim_create_user_command('TrunDiag', function(opts)
- if #opts.fargs == 0 then
- select()
- else
- local qf_items = trun_to_qf_list(opts.fargs[1])
+ local function open(name)
+ local qf_items = trun_to_qf_list(name)
if not qf_items then
return
end
open_diag(qf_items)
end
-end, autocomplete)
-vim.api.nvim_create_user_command('Trun', function(opts)
if #opts.fargs == 0 then
- select()
+ local package_name = require('tms.ft.dart.package').package_name()
+ if not package_name then
+ select()
+ end
+ open(package_name)
else
- local qf_items = trun_to_qf_list(opts.fargs[1])
+ open(opts.fargs[1])
+ end
+end, autocomplete)
+
+vim.api.nvim_create_user_command('Trun', function(opts)
+ local function open(name)
+ local qf_items = trun_to_qf_list(name)
if not qf_items then
return
end
open_qf(qf_items)
end
+
+ if #opts.fargs == 0 then
+ local package_name = require('tms.ft.dart.package').package_name()
+ if not package_name then
+ select()
+ end
+ open(package_name)
+ else
+ open(opts.fargs[1])
+ end
end, autocomplete)