Reformat
This commit is contained in:
parent
b17f2703fb
commit
ac044d172c
5 changed files with 31 additions and 28 deletions
4
init.lua
4
init.lua
|
|
@ -36,7 +36,7 @@ g.mapleader = ","
|
||||||
-- opt.fillchars = { eob = "~" }
|
-- opt.fillchars = { eob = "~" }
|
||||||
opt.scrolloff = 4
|
opt.scrolloff = 4
|
||||||
opt.spelllang = "fr"
|
opt.spelllang = "fr"
|
||||||
opt.colorcolumn = {100}
|
opt.colorcolumn = { 100 }
|
||||||
opt.textwidth = 100
|
opt.textwidth = 100
|
||||||
opt.timeoutlen = 1000
|
opt.timeoutlen = 1000
|
||||||
opt.breakindent = true
|
opt.breakindent = true
|
||||||
|
|
@ -53,7 +53,7 @@ require("lazy").setup(plugins)
|
||||||
vim.cmd.colorscheme "catppuccin"
|
vim.cmd.colorscheme "catppuccin"
|
||||||
|
|
||||||
-- if $XDG_STATE_HOME/darkmode exists, set dark background, light other wise
|
-- if $XDG_STATE_HOME/darkmode exists, set dark background, light other wise
|
||||||
local path = ( vim.fn.getenv("XDG_STATE_HOME") or "~/.local/state" ) .. "/darkmode"
|
local path = (vim.fn.getenv("XDG_STATE_HOME") or "~/.local/state") .. "/darkmode"
|
||||||
if vim.fn.filereadable(path) == 1 then
|
if vim.fn.filereadable(path) == 1 then
|
||||||
opt.background = "dark"
|
opt.background = "dark"
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
local dap = require("dap")
|
local dap = require("dap")
|
||||||
-- dap.configurations.c = {
|
-- dap.configurations.c = {
|
||||||
-- {
|
-- {
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ local opts = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
sections = {
|
sections = {
|
||||||
lualine_a = { 'mode', {hydra.get_name, cond = hydra.is_active}},
|
lualine_a = { 'mode', { hydra.get_name, cond = hydra.is_active } },
|
||||||
lualine_b = { 'branch', 'diff' },
|
lualine_b = { 'branch', 'diff' },
|
||||||
lualine_c = {
|
lualine_c = {
|
||||||
'filename',
|
'filename',
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ vim.keymap.set({ 'n', 'v' }, 'f', "<cmd> HopWord <cr>", { desc = "HopWord" })
|
||||||
|
|
||||||
-- marks
|
-- marks
|
||||||
vim.keymap.set({ 'n' }, "<A-A>", "mA", { desc = "Set mark A", remap = true })
|
vim.keymap.set({ 'n' }, "<A-A>", "mA", { desc = "Set mark A", remap = true })
|
||||||
vim.keymap.set({ 'n' }, "<A-a>", "g'A", { desc = "Jump to mark A", remap = true})
|
vim.keymap.set({ 'n' }, "<A-a>", "g'A", { desc = "Jump to mark A", remap = true })
|
||||||
vim.keymap.set({ 'n' }, "<A-Z>", "mZ", { desc = "Set mark Z" })
|
vim.keymap.set({ 'n' }, "<A-Z>", "mZ", { desc = "Set mark Z" })
|
||||||
vim.keymap.set({ 'n' }, "<A-z>", "g'Z", { desc = "Jump to mark Z" })
|
vim.keymap.set({ 'n' }, "<A-z>", "g'Z", { desc = "Jump to mark Z" })
|
||||||
vim.keymap.set({ 'n' }, "<A-E>", "mE", { desc = "Set mark E" })
|
vim.keymap.set({ 'n' }, "<A-E>", "mE", { desc = "Set mark E" })
|
||||||
|
|
@ -90,22 +90,26 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
-- Descriptions for lspconfig mappings
|
-- Descriptions for lspconfig mappings
|
||||||
local wk = require("which-key")
|
local wk = require("which-key")
|
||||||
wk.add({
|
wk.add({
|
||||||
{"<leader>e", vim.diagnostic.open_float, desc = "Show diagnostics" },
|
{ "<leader>e", vim.diagnostic.open_float, desc = "Show diagnostics" },
|
||||||
{"[[", vim.diagnostic.goto_prev, desc = "Previous diagnostic" },
|
{ "[[", vim.diagnostic.goto_prev, desc = "Previous diagnostic" },
|
||||||
{"]]", vim.diagnostic.goto_next, desc = "Next diagnostic" },
|
{ "]]", vim.diagnostic.goto_next, desc = "Next diagnostic" },
|
||||||
{"<leader>q", vim.diagnostic.setloclist, desc = "Set location list" },
|
{ "<leader>q", vim.diagnostic.setloclist, desc = "Set location list" },
|
||||||
{"gD", vim.lsp.buf.declaration, desc = "Goto declaration" },
|
{ "gD", vim.lsp.buf.declaration, desc = "Goto declaration" },
|
||||||
{"gd", vim.lsp.buf.definition, desc = "Goto definition" },
|
{ "gd", vim.lsp.buf.definition, desc = "Goto definition" },
|
||||||
{"K", vim.lsp.buf.hover, desc = "Hover" },
|
{ "K", vim.lsp.buf.hover, desc = "Hover" },
|
||||||
{"gi", vim.lsp.buf.implementation, desc = "Goto implementation" },
|
{ "gi", vim.lsp.buf.implementation, desc = "Goto implementation" },
|
||||||
{"<C-k>", vim.lsp.buf.signature_help, desc = "Signature help" },
|
{ "<C-k>", vim.lsp.buf.signature_help, desc = "Signature help" },
|
||||||
{"<leader>D", vim.lsp.buf.type_definition, desc = "Goto type definition" },
|
{ "<leader>D", vim.lsp.buf.type_definition, desc = "Goto type definition" },
|
||||||
{"<leader>ra", vim.lsp.buf.rename, desc = "Rename" },
|
{ "<leader>ra", vim.lsp.buf.rename, desc = "Rename" },
|
||||||
{"<leader>ca", vim.lsp.buf.code_action, desc = "Code action" },
|
{ "<leader>ca", vim.lsp.buf.code_action, desc = "Code action" },
|
||||||
{"gr", vim.lsp.buf.references, desc = "Goto references" },
|
{ "gr", vim.lsp.buf.references, desc = "Goto references" },
|
||||||
{"<leader>fm", function()
|
{
|
||||||
|
"<leader>fm",
|
||||||
|
function()
|
||||||
vim.lsp.buf.format { async = true }
|
vim.lsp.buf.format { async = true }
|
||||||
end, desc = "Format" },
|
end,
|
||||||
|
desc = "Format"
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- DAP
|
-- DAP
|
||||||
|
|
@ -147,7 +151,7 @@ Hydra({
|
||||||
{ 'c', dap.continue, { desc = "Continue" } },
|
{ 'c', dap.continue, { desc = "Continue" } },
|
||||||
{ 'r', dap.restart, { desc = "Restart" } },
|
{ 'r', dap.restart, { desc = "Restart" } },
|
||||||
-- { 'i', dap.pause, { desc = "Pause" } },
|
-- { 'i', dap.pause, { desc = "Pause" } },
|
||||||
{ 'I', nil, { } },
|
{ 'I', nil, {} },
|
||||||
{ 's', dap.step_into, { desc = "Step into" } },
|
{ 's', dap.step_into, { desc = "Step into" } },
|
||||||
{ 'a', dap.step_over, { desc = "Step over" } },
|
{ 'a', dap.step_over, { desc = "Step over" } },
|
||||||
{ 'A', dap.step_out, { desc = "Step out" } },
|
{ 'A', dap.step_out, { desc = "Step out" } },
|
||||||
|
|
|
||||||
|
|
@ -228,7 +228,7 @@ local plugins = {
|
||||||
{
|
{
|
||||||
"olimorris/persisted.nvim",
|
"olimorris/persisted.nvim",
|
||||||
lazy = false, -- make sure the plugin is always loaded at startup
|
lazy = false, -- make sure the plugin is always loaded at startup
|
||||||
config = function ()
|
config = function()
|
||||||
require("persisted").setup({
|
require("persisted").setup({
|
||||||
autosave = true,
|
autosave = true,
|
||||||
autoload = true,
|
autoload = true,
|
||||||
|
|
@ -375,11 +375,11 @@ local plugins = {
|
||||||
"sindrets/diffview.nvim", -- optional
|
"sindrets/diffview.nvim", -- optional
|
||||||
"ibhagwan/fzf-lua", -- optional
|
"ibhagwan/fzf-lua", -- optional
|
||||||
},
|
},
|
||||||
config = function ()
|
config = function()
|
||||||
require("neogit").setup({
|
require("neogit").setup({
|
||||||
sections = {
|
sections = {
|
||||||
untracked = {
|
untracked = {
|
||||||
folded = true;
|
folded = true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -491,7 +491,7 @@ local plugins = {
|
||||||
"theHamsta/nvim-dap-virtual-text",
|
"theHamsta/nvim-dap-virtual-text",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
dependencies = { "mfussenegger/nvim-dap", "nvim-treesitter/nvim-treesitter" },
|
dependencies = { "mfussenegger/nvim-dap", "nvim-treesitter/nvim-treesitter" },
|
||||||
config = function ()
|
config = function()
|
||||||
require("configs.dap")
|
require("configs.dap")
|
||||||
require("nvim-dap-virtual-text").setup()
|
require("nvim-dap-virtual-text").setup()
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue