Quality of live changes

This commit is contained in:
Zoe Roux
2022-04-12 15:48:22 +02:00
parent 7bb881bec3
commit 1dac572aad
7 changed files with 34 additions and 18 deletions
+1
View File
@@ -11,4 +11,5 @@ require "dap-config"
require "tests"
require "documentation"
require "build"
require "dispatch"
+7 -4
View File
@@ -4,10 +4,13 @@ vim.g["dispatch_no_maps"] = 1
local wk = require("which-key")
wk.register({
b = { "<cmd>lua require('build').build()<cr>", "Build project" },
r = { "<cmd>lua require('build').run()<cr>", "Run project" },
s = { "<cmd>lua require('build').select_proj()<cr>", "Select project" },
d = { "<cmd>lua require('build').debug()<cr>", "Debug project" },
b = {
name = "Build",
b = { "<cmd>lua require('build').build()<cr>", "Build project" },
r = { "<cmd>lua require('build').run()<cr>", "Run project" },
s = { "<cmd>lua require('build').select_proj()<cr>", "Select project" },
d = { "<cmd>lua require('build').debug()<cr>", "Debug project" },
}
}, {
prefix = "<leader>",
})
+12 -12
View File
@@ -47,17 +47,17 @@ cmp.setup({
require('luasnip').lsp_expand(args.body)
end,
},
enabled = function()
-- disable completion in comments
local context = require 'cmp.config.context'
-- keep command mode completion enabled when cursor is in a comment
if vim.api.nvim_get_mode().mode == 'c' then
return true
else
return not context.in_treesitter_capture("comment")
and not context.in_syntax_group("Comment")
end
end,
-- enabled = function()
-- -- disable completion in comments
-- local context = require 'cmp.config.context'
-- -- keep command mode completion enabled when cursor is in a comment
-- if vim.api.nvim_get_mode().mode == 'c' then
-- return true
-- else
-- return not context.in_treesitter_capture("comment")
-- and not context.in_syntax_group("Comment")
-- end
-- end,
mapping = {
["<Up>"] = cmp.mapping.select_prev_item(),
["<Down>"] = cmp.mapping.select_next_item(),
@@ -95,7 +95,7 @@ cmp.setup({
sources = {
{ name = "nvim_lsp" },
{ name = 'luasnip' },
{ name = "buffer" },
-- { name = "buffer" },
{ name = "path" },
},
formatting = {
+4 -2
View File
@@ -14,11 +14,13 @@ vim.cmd [[
]]
metals_config = metals.bare_config()
-- Example of settings
metals_config.settings = {
showImplicitArguments = true,
showInferredType = true,
showImplicitConversionsAndClasses = true,
}
-- metals_config.init_options.statusBarProvider = "on"
metals_config.on_attach = function(client, bufnr)
metals.setup_dap()
require "lsp.handlers".on_attach(client, bufnr)
@@ -72,6 +72,12 @@ keymap("x", "<leader>y", '"+y', opts)
keymap("n", "<leader>Y", '"+Y', opts)
keymap("x", "<leader>Y", '"+Y', opts)
keymap("n", "<leader>p", '"+p', opts)
keymap("x", "<leader>p", '"+p', opts)
keymap("n", "<leader>P", '"+P', opts)
keymap("x", "<leader>P", '"+P', opts)
keymap("t", "<C-W>", "<C-\\><C-N><C-W>", opts)
vim.cmd [[
@@ -33,6 +33,8 @@ nvim_tree.setup {
{ key = "<CR>", action = "edit_in_place" },
{ key = "h", action = "close_node" },
{ key = "<Left>", action = "close_node" },
{ key = "t", action = "tabnew" },
{ key = "<C-t>", action = "" },
},
},
},
@@ -33,6 +33,8 @@ wk.register({
wk.register({
y = { "Yank to system clipboard" },
Y = { "Yank line to system clipboard" },
p = { "Past from system clipboard" },
P = { "Past line from system clipboard" },
}, {
prefix = "<leader>"
})