backup
This commit is contained in:
parent
59f23d053a
commit
c70b7a2540
5 changed files with 168 additions and 31 deletions
|
@ -1,17 +1,37 @@
|
|||
-- This file needs to have same structure as nvconfig.lua
|
||||
-- This file needs to have same structure as nvconfig.lua
|
||||
-- https://github.com/NvChad/ui/blob/v2.5/lua/nvconfig.lua
|
||||
-- Please read that file to know all available options :(
|
||||
-- Please read that file to know all available options :(
|
||||
|
||||
---@type ChadrcConfig
|
||||
local M = {}
|
||||
|
||||
M.base46 = {
|
||||
theme = "onedark",
|
||||
theme = "solarized_osaka",
|
||||
|
||||
-- hl_override = {
|
||||
-- Comment = { italic = true },
|
||||
-- ["@comment"] = { italic = true },
|
||||
-- },
|
||||
}
|
||||
M.mason = {
|
||||
pkgs = {
|
||||
"clangd", "codelldb", "clang-format"
|
||||
}
|
||||
}
|
||||
M.mappings = {
|
||||
dap = {
|
||||
plugin = true,
|
||||
n = {
|
||||
["<leader>db"] = {
|
||||
"<cmd> DapToggleBreakpoint <CR>",
|
||||
"Add breakpoint at line",
|
||||
},
|
||||
["<leader>dr"] = {
|
||||
"<cmd> DapContinue <CR>",
|
||||
"Start or continue the debugger",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return M
|
||||
|
|
|
@ -4,17 +4,23 @@ require("nvchad.configs.lspconfig").defaults()
|
|||
local lspconfig = require "lspconfig"
|
||||
|
||||
-- EXAMPLE
|
||||
local servers = { "html", "cssls" }
|
||||
-- local servers = { "clangd" }
|
||||
local nvlsp = require "nvchad.configs.lspconfig"
|
||||
|
||||
-- lsps with default config
|
||||
for _, lsp in ipairs(servers) do
|
||||
lspconfig[lsp].setup {
|
||||
-- for _, lsp in ipairs(servers) do
|
||||
-- lspconfig[lsp].setup {
|
||||
-- on_attach = nvlsp.on_attach,
|
||||
-- on_init = nvlsp.on_init,
|
||||
-- capabilities = nvlsp.capabilities,
|
||||
-- }
|
||||
-- end
|
||||
|
||||
lspconfig.clangd.setup {
|
||||
on_attach = nvlsp.on_attach,
|
||||
on_init = nvlsp.on_init,
|
||||
capabilities = nvlsp.capabilities,
|
||||
}
|
||||
end
|
||||
}
|
||||
|
||||
-- configuring single server, example: typescript
|
||||
-- lspconfig.ts_ls.setup {
|
||||
|
|
|
@ -4,7 +4,8 @@ require "nvchad.mappings"
|
|||
|
||||
local map = vim.keymap.set
|
||||
|
||||
map("n", ";", ":", { desc = "CMD enter command mode" })
|
||||
-- map("n", ";", ":", { desc = "CMD enter command mode" })
|
||||
map("i", "jk", "<ESC>")
|
||||
map("i", "<sc-L>", "<Del>")
|
||||
|
||||
-- map({ "n", "i", "v" }, "<C-s>", "<cmd> w <cr>")
|
||||
|
|
|
@ -1,6 +1,54 @@
|
|||
require "nvchad.options"
|
||||
|
||||
-- add yours here!
|
||||
vim.opt.foldmethod = "marker"
|
||||
vim.opt.colorcolumn = "81"
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = true
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.splitbelow = true
|
||||
vim.opt.splitright = true
|
||||
-- vim.opt.wildignore += "*.o,*.out,.git"
|
||||
vim.opt.updatetime = 250
|
||||
vim.g.python_recommended_style = 0
|
||||
vim.opt.clipboard = ''
|
||||
|
||||
vim.cmd [[
|
||||
command -range=% Encrypt execute "'<,'>!gcrypt -S -e \"$(pass show pdata)\" | base64"
|
||||
command -range=% Decrypt execute "'<,'>!base64 -d | gcrypt -S -d \"$(pass show pdata)\""
|
||||
|
||||
autocmd ColorScheme * highlight ExtraWhitespace ctermbg=red guibg=red
|
||||
highlight ExtraWhitespace ctermbg=cyan guibg=cyan
|
||||
autocmd InsertLeave * redraw!
|
||||
match ExtraWhitespace /\s\+$\| \+\ze\t/
|
||||
autocmd BufWritePre * :%s/\s\+$//e
|
||||
|
||||
augroup line_return
|
||||
au!
|
||||
au BufReadPost *
|
||||
\ if line("'\"") > 0 && line("'\"") <= line("$") |
|
||||
\ execute 'normal! g`"zvzz' |
|
||||
\ endif
|
||||
augroup END
|
||||
|
||||
au BufNewFile,BufRead *.xdefaults,*.palette,~/.local/etc/theme*,~/.urxvt/config set syntax=xdefaults
|
||||
|
||||
set backup
|
||||
set undodir=~/.config/nvim/tmp/undo//
|
||||
set backupdir=~/.config/nvim/tmp/backup//
|
||||
set directory=~/.config/nvim/tmp/swap//
|
||||
|
||||
if !isdirectory(expand(&undodir))
|
||||
call mkdir(expand(&undodir), "p")
|
||||
endif
|
||||
if !isdirectory(expand(&backupdir))
|
||||
call mkdir(expand(&backupdir), "p")
|
||||
endif
|
||||
if !isdirectory(expand(&directory))
|
||||
call mkdir(expand(&directory), "p")
|
||||
endif
|
||||
]]
|
||||
|
||||
|
||||
-- local o = vim.o
|
||||
-- o.cursorlineopt ='both' -- to enable cursorline!
|
||||
|
|
|
@ -1,25 +1,87 @@
|
|||
return {
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
-- event = 'BufWritePre', -- uncomment for format on save
|
||||
opts = require "configs.conform",
|
||||
},
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
-- event = 'BufWritePre', -- uncomment for format on save
|
||||
opts = require "configs.conform",
|
||||
},
|
||||
|
||||
-- These are some examples, uncomment them if you want to see them work!
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
require "configs.lspconfig"
|
||||
end,
|
||||
},
|
||||
-- These are some examples, uncomment them if you want to see them work!
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
require "configs.lspconfig"
|
||||
end,
|
||||
},
|
||||
|
||||
-- {
|
||||
-- "nvim-treesitter/nvim-treesitter",
|
||||
-- opts = {
|
||||
-- ensure_installed = {
|
||||
-- "vim", "lua", "vimdoc",
|
||||
-- "html", "css"
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- {
|
||||
-- "nvim-treesitter/nvim-treesitter",
|
||||
-- dependencies = {
|
||||
-- "nvim-treesitter/nvim-treesitter-context",
|
||||
-- "LiadOz/nvim-dap-repl-highlights",
|
||||
-- },
|
||||
-- config = function()
|
||||
-- require('nvim-dap-repl-highlights').setup() -- must be setup before nvim-treesitter
|
||||
-- require('nvim-treesitter.configs').setup {
|
||||
-- ensure_installed = {
|
||||
-- "vim", "lua", "vimdoc", "dap_repl"
|
||||
-- },
|
||||
-- }
|
||||
-- end,
|
||||
-- },
|
||||
|
||||
{
|
||||
"mfussenegger/nvim-dap",
|
||||
-- config = function(_,_)
|
||||
-- require ("nvchad.utils").load_mappings("dap")
|
||||
-- end
|
||||
},
|
||||
|
||||
{
|
||||
"jay-babu/mason-nvim-dap.nvim",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
"williamboman/mason.nvim",
|
||||
"mfussenegger/nvim-dap",
|
||||
},
|
||||
opts = {
|
||||
handlers = {},
|
||||
-- ensure_installed = {
|
||||
-- "codelldb",
|
||||
-- },
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"rcarriga/nvim-dap-ui",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
"mfussenegger/nvim-dap",
|
||||
"nvim-neotest/nvim-nio",
|
||||
},
|
||||
config = function()
|
||||
local dap, dapui = require("dap"), require("dapui")
|
||||
|
||||
dapui.setup()
|
||||
|
||||
dap.listeners.before.attach.dapui_config = function()
|
||||
dapui.open()
|
||||
end
|
||||
dap.listeners.before.launch.dapui_config = function()
|
||||
dapui.open()
|
||||
end
|
||||
dap.listeners.before.event_terminated.dapui_config = function()
|
||||
dapui.close()
|
||||
end
|
||||
dap.listeners.before.event_exited.dapui_config = function()
|
||||
dapui.close()
|
||||
end
|
||||
end
|
||||
},
|
||||
|
||||
-- {
|
||||
-- "LiadOz/nvim-dap-repl-highlights",
|
||||
-- config = function()
|
||||
-- require('nvim-dap-repl-highlights').setup()
|
||||
-- end
|
||||
-- }
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue