Compare commits

..

No commits in common. "23914d9d0989d70f1ef441e562a84ab31d6485bb" and "2934dd2ed9376e29d4aa60399a17e4b531d91e9c" have entirely different histories.

3 changed files with 11 additions and 49 deletions

View File

@ -1,3 +1,5 @@
--vim.keymap.set("", "<S-Tab>", "<C-d>", { remap = true })
-- Move by words
vim.keymap.set("", "<C-j>", "b")
vim.keymap.set("", "<C-l>", "e")
@ -12,23 +14,3 @@ vim.keymap.set("", "<C-a>", "ggVG")
-- reselect visual selection after indentation
vim.keymap.set("v", "<", "< gv")
vim.keymap.set("v", ">", "> gv")
vim.keymap.set("", "<S-Tab>", "<C-o> <")
vim.keymap.set("v", "<Tab>", "> gv")
-- Line operations
-- -- duplicate line
vim.keymap.set("n", "<C-d>", "\"dyy \"dp")
-- -- swap lines
vim.keymap.set({ "i", "n" }, "<C-Up>", function()
if vim.fn.line(".") > 1 then
vim.cmd [[m-2]]
end
end)
vim.keymap.set({ "i", "n" }, "<C-Down>", function()
if vim.fn.line(".") < vim.fn.line("$") then
vim.cmd [[m+1]]
end
end)
--vim.keymap.set("v", "<C-Up>", )

View File

@ -9,7 +9,7 @@ return {
ts_config = {
lua = { "string" }, -- do not add pair in this node
},
-- General config
map_cr = true,
},
@ -24,19 +24,8 @@ return {
require("mason-lspconfig").setup_handlers {
function(server_name)
require("lspconfig")[server_name].setup {
--capabilities = capabilities,
capabilities = capabilites,
}
end,
["neocmake"] = function()
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = true
require("vim.lsp").set_log_level("TRACE")
require("lspconfig").neocmake.setup({
capabilities = capabilities,
root_dir = function(fname)
return require("lspconfig").util.find_git_ancestor(fname)
end,
})
end
}
end
@ -53,12 +42,11 @@ return {
"asm_lsp",
"bashls",
"clangd",
"lua_ls",
"neocmake",
"pyright",
},
},
},
},
{
"hrsh7th/nvim-cmp",
event = { "InsertEnter", "CmdlineEnter", },
@ -76,7 +64,7 @@ return {
-- Looks
"onsails/lspkind.nvim", -- Add symbols for type
},
config = function()
config = function()
local cmp = require("cmp")
cmp.setup({
@ -85,11 +73,11 @@ return {
require("luasnip").lsp_expand(args.body)
end
},
view = {
view = {
entries = {
name = 'custom',
name = 'custom',
selection_order = 'near_cursor'
}
}
},
formatting = {
format = require("lspkind").cmp_format({
@ -106,7 +94,6 @@ return {
{ name = "path" },
},
mapping = {
["<C-Space>"] = cmp.mapping.complete(),
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
if #cmp.get_entries() == 1 then
@ -129,10 +116,7 @@ return {
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
else
fallback()
end
end, { "i", "s", "c" }),
["<CR>"] = cmp.mapping({
i = function(fallback)

View File

@ -13,15 +13,11 @@ return {
-- trigger highlighting when opening a new buffer
vim.api.nvim_create_autocmd(
{ "BufNew", "BufRead" },
{ "BufNew", "BufRead" },
{
callback = function()
local colorizer = require("colorizer")
local options = nil
if colorizer.is_buffer_attached(0) then
options = colorizer.get_buffer_options(0)
end
colorizer.attach_to_buffer(0, options)
colorizer.attach_to_buffer(0, colorizer.get_buffer_options(0))
end
})
end,