neovim

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

commit 1d1da1f4456b6a37d5f6a7b5bd2e80673b2a6641
parent 57aaf8d69d2850b6562fd4fa7d2540cee055b9e6
Author: Tomas Nemec <nemi@skaut.cz>
Date:   Mon,  1 Nov 2021 08:31:05 +0100

update

Diffstat:
Mlua/tms/p/dap.lua | 14++++----------
Mlua/tms/p/treesitter.lua | 5+++--
Mlua/tms/plugins.lua | 14+++++++++++++-
3 files changed, 20 insertions(+), 13 deletions(-)

diff --git a/lua/tms/p/dap.lua b/lua/tms/p/dap.lua @@ -11,9 +11,7 @@ local function cpp() name = 'lldb', } - dap.configurations.cpp = { - {type = 'cpp', request = 'launch', name = 'Launch File', program = '${file}'}, - } + dap.configurations.cpp = {{type = 'cpp', request = 'launch', name = 'Launch File', program = '${file}'}} end local function dart() @@ -46,9 +44,7 @@ local function lua() name = 'Attach to running Neovim instance', host = function() local value = vim.fn.input('Host [127.0.0.1]: ') - if value ~= '' then - return value - end + if value ~= '' then return value end return '127.0.0.1' end, port = function() @@ -59,9 +55,7 @@ local function lua() }, } - dap.adapters.nlua = function(callback, config) - callback({type = 'server', host = config.host, port = config.port}) - end + dap.adapters.nlua = function(callback, config) callback({type = 'server', host = config.host, port = config.port}) end end function M.setup() @@ -69,7 +63,7 @@ function M.setup() -- dart() lua() - vim.g.dap_virtual_text = true + require('nvim-dap-virtual-text').setup(); end function M.setup_ui() dapui.setup() end diff --git a/lua/tms/p/treesitter.lua b/lua/tms/p/treesitter.lua @@ -3,7 +3,7 @@ local M = {} M.setup = function() require'nvim-treesitter.configs'.setup { ensure_intalled = 'maintained', - highlight = {enable = true--[[ , disable = {'scss'} --]]}, + highlight = {enable = true --[[ , disable = {'scss'} --]] }, indent = {enable = true}, @@ -48,9 +48,10 @@ M.setup = function() }, playground = {enable = true, disable = {}, updatetime = 25, persist_queries = false}, + context_commentstring = {enable = true, enable_autocmd = false}, } - require "nvim-treesitter.highlight" + require 'nvim-treesitter.highlight' local hlmap = vim.treesitter.highlighter.hl_map hlmap.error = nil end diff --git a/lua/tms/plugins.lua b/lua/tms/plugins.lua @@ -27,7 +27,19 @@ local function init() end, } use 'michaeljsmith/vim-indent-object' - use {'numToStr/Comment.nvim', config = function() require('Comment').setup() end} + use {'JoosepAlviste/nvim-ts-context-commentstring'} + use { + 'numToStr/Comment.nvim', + config = function() + require('Comment').setup({ + pre_hook = function(_) + local aaa = require('ts_context_commentstring.internal').calculate_commentstring() + dump(aaa) + return aaa + end, + }) + end, + } use { -- undo tree 'mbbill/undotree', config = function()