mirror of
https://github.com/kristoferssolo/SoloVim.git
synced 2025-10-21 20:10:41 +00:00
Minor fixes
This commit is contained in:
parent
e0f8c76dd4
commit
fb9f1ab0c3
@ -4,7 +4,7 @@ vim.api.nvim_create_autocmd({ "FileType" }, {
|
||||
pattern = { "qf", "help", "man", "lspinfo", "spectre_panel", "lir" },
|
||||
callback = function()
|
||||
vim.cmd([[
|
||||
nnoremap <silent> <buffer> q :close<CR>
|
||||
nnoremap <silent> <buffer> q :close<cr>
|
||||
set nobuflisted
|
||||
]])
|
||||
end,
|
||||
@ -26,7 +26,7 @@ vim.api.nvim_create_autocmd({ "FileType" }, {
|
||||
pattern = { "gitcommit", "markdown", "vimwiki" },
|
||||
callback = function()
|
||||
vim.opt_local.wrap = true
|
||||
vim.opt_local.spell = true
|
||||
-- vim.opt_local.spell = true
|
||||
end,
|
||||
})
|
||||
|
||||
@ -74,10 +74,19 @@ vim.api.nvim_create_autocmd({ "FileType" }, {
|
||||
vim.cmd([[
|
||||
highlight CursorLine ctermbg=White cterm=bold guibg=#222222
|
||||
highlight CursorColumn ctermbg=White cterm=bold guibg=#222222
|
||||
autocmd FileType python imap <buffer> <C-b> <esc><cmd>w<CR><cmd>exec "!python3" shellescape(@%, 1)<CR>
|
||||
autocmd FileType python map <buffer> <C-b> <cmd>w<CR><cmd>exec "!python3" shellescape(@%, 1)<CR>
|
||||
autocmd FileType rust imap <buffer> <C-b> <esc><cmd>w<CR><cmd>exec "!cargo run"<CR>
|
||||
autocmd FileType rust map <buffer> <C-b> <cmd>w<CR><cmd>exec "!cargo run"<CR>
|
||||
autocmd FileType tex imap <buffer> <C-b> <esc><cmd>w<CR><cmd>exec "silent !lualatex %"<CR>
|
||||
autocmd FileType tex map <buffer> <C-b> <esc><cmd>w<CR><cmd>exec "silent !lualatex %"<CR>
|
||||
autocmd FileType python imap <buffer> <C-b> <esc><cmd>w<cr><cmd>exec "!python3" shellescape(@%, 1)<cr>
|
||||
autocmd FileType python map <buffer> <C-b> <cmd>w<cr><cmd>exec "!python3" shellescape(@%, 1)<cr>
|
||||
autocmd FileType rust imap <buffer> <C-b> <esc><cmd>w<cr><cmd>exec "!cargo run"<cr>
|
||||
autocmd FileType rust map <buffer> <C-b> <cmd>w<cr><cmd>exec "!cargo run"<cr>
|
||||
autocmd FileType tex imap <buffer> <C-b> <esc><cmd>w<cr><cmd>exec "silent !lualatex %"<cr>
|
||||
autocmd FileType tex map <buffer> <C-b> <esc><cmd>w<cr><cmd>exec "silent !lualatex %"<cr>
|
||||
]])
|
||||
|
||||
-- Autocommand that reloads waybar whenever you save the ~/.config/waybar/config file
|
||||
vim.cmd([[
|
||||
augroup waybar_user_config
|
||||
autocmd!
|
||||
autocmd BufWritePost ~/Nextcloud/solorice/.config/waybar/config silent !pkill waybar && waybar & disown <afile>
|
||||
autocmd BufWritePost ~/Nextcloud/solorice/.config/waybar/style.css silent !pkill waybar && waybar & disown <afile>
|
||||
augroup end
|
||||
]])
|
||||
|
||||
@ -8,10 +8,10 @@ if not dap_status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
-- local dap_ui_status_ok, dapui = pcall(require, "dapui")
|
||||
-- if not dap_ui_status_ok then
|
||||
-- return
|
||||
-- end
|
||||
local dap_ui_status_ok, dapui = pcall(require, "dapui")
|
||||
if not dap_ui_status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local dap_install_status_ok, dap_install = pcall(require, "dap-install")
|
||||
if not dap_install_status_ok then
|
||||
@ -27,43 +27,43 @@ dap_install.setup({})
|
||||
dap_install.config("python", {})
|
||||
-- add other configs here
|
||||
|
||||
-- dapui.setup({
|
||||
-- layouts = {
|
||||
-- {
|
||||
dapui.setup({
|
||||
layouts = {
|
||||
{
|
||||
elements = {
|
||||
"scopes",
|
||||
"breakpoints",
|
||||
"stacs",
|
||||
"watches",
|
||||
},
|
||||
size = 40,
|
||||
position = "left",
|
||||
},
|
||||
{
|
||||
elements = {
|
||||
"repl",
|
||||
"console",
|
||||
},
|
||||
size = 10,
|
||||
position = "bottom",
|
||||
},
|
||||
},
|
||||
|
||||
-- sidebar = {
|
||||
-- elements = {
|
||||
-- "scopes",
|
||||
-- "breakpoints",
|
||||
-- "stacs",
|
||||
-- "watches",
|
||||
-- {
|
||||
-- id = "scopes",
|
||||
-- size = 0.25, -- Can be float or integer > 1
|
||||
-- },
|
||||
-- { id = "breakpoints", size = 0.25 },
|
||||
-- },
|
||||
-- size = 40,
|
||||
-- position = "left",
|
||||
-- position = "right", -- Can be "left", "right", "top", "bottom"
|
||||
-- },
|
||||
-- {
|
||||
-- elements = {
|
||||
-- "repl",
|
||||
-- "console",
|
||||
-- tray = {
|
||||
-- elements = {},
|
||||
-- },
|
||||
-- size = 10,
|
||||
-- position = "bottom",
|
||||
-- },
|
||||
-- },
|
||||
--
|
||||
-- -- sidebar = {
|
||||
-- -- elements = {
|
||||
-- -- {
|
||||
-- -- id = "scopes",
|
||||
-- -- size = 0.25, -- Can be float or integer > 1
|
||||
-- -- },
|
||||
-- -- { id = "breakpoints", size = 0.25 },
|
||||
-- -- },
|
||||
-- -- size = 40,
|
||||
-- -- position = "right", -- Can be "left", "right", "top", "bottom"
|
||||
-- -- },
|
||||
-- -- tray = {
|
||||
-- -- elements = {},
|
||||
-- -- },
|
||||
-- })
|
||||
})
|
||||
|
||||
vim.fn.sign_define("DapBreakpoint", { text = "", texthl = "DiagnosticSignError", linehl = "", numhl = "" })
|
||||
|
||||
|
||||
@ -145,9 +145,14 @@ for _, server in pairs(servers) do
|
||||
|
||||
goto continue
|
||||
end
|
||||
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities.offsetEncoding = { "utf-16" }
|
||||
|
||||
if server == "clangd" then
|
||||
require("clangd_extensions").setup({
|
||||
server = {
|
||||
capabilities = capabilities,
|
||||
-- options to pass to nvim-lspconfig
|
||||
-- i.e. the arguments to require("lspconfig").clangd.setup({})
|
||||
},
|
||||
|
||||
@ -19,7 +19,7 @@ null_ls.setup({
|
||||
sources = {
|
||||
formatting.prettier.with({
|
||||
extra_filetypes = { "toml" },
|
||||
extra_args = { "--no-semi", "--single-quote", "--jsx-single-quote" },
|
||||
extra_args = { "--no-semi", "--single-quote", "--jsx-single-quote", "--no-bracket-spacing" },
|
||||
}),
|
||||
formatting.autopep8,
|
||||
formatting.stylua,
|
||||
@ -29,7 +29,7 @@ null_ls.setup({
|
||||
diagnostics.cpplint,
|
||||
diagnostics.luacheck,
|
||||
diagnostics.pylint,
|
||||
-- diagnostics.mypy,
|
||||
diagnostics.mypy,
|
||||
diagnostics.zsh,
|
||||
},
|
||||
})
|
||||
|
||||
@ -238,13 +238,22 @@ local mappings = {
|
||||
},
|
||||
L = {
|
||||
name = "Language settings",
|
||||
c = { "<cmd>setlocal formatoptions-=cro<CR>", "Disable autocomment" },
|
||||
C = { "<cmd>setlocal formatoptions=cro<CR>", "Enable autocomment" },
|
||||
s = { "<cmd>setlocal spell!<CR>", "Toggle spellchecker" },
|
||||
e = { "<cmd>setlocal spell spelllang=en_us<CR>", "Enable English spellchecker" },
|
||||
l = { "<cmd>setlocal spell spelllang=lv_LV<CR>", "Enable Lavian spellchecker" },
|
||||
I = { "<cmd>setlocal autoindent<CR>", "Enable autoindent" },
|
||||
i = { "<cmd>setlocal noautoindent<CR>", "Disable autoindent" },
|
||||
c = { "<cmd>setlocal formatoptions-=cro<cr>", "Disable autocomment" },
|
||||
C = { "<cmd>setlocal formatoptions=cro<cr>", "Enable autocomment" },
|
||||
s = { "<cmd>setlocal spell!<cr>", "Toggle spellchecker" },
|
||||
e = { "<cmd>setlocal spell spelllang=en_us<cr>", "Enable English spellchecker" },
|
||||
l = { "<cmd>setlocal spell spelllang=lv_LV<cr>", "Enable Lavian spellchecker" },
|
||||
I = { "<cmd>setlocal autoindent<cr>", "Enable autoindent" },
|
||||
i = { "<cmd>setlocal noautoindent<cr>", "Disable autoindent" },
|
||||
},
|
||||
d = {
|
||||
name = "DAP",
|
||||
d = { "<cmd>lua require('dap').toggle_breakpoint()<cr>", "Set breakpoint" },
|
||||
t = { "<cmd>lua require('dapui').toggle()<cr>", "Toggle DAP-UI" },
|
||||
c = { "<cmd>lua require('dap').continue()<cr>", "Launch debug sessions and resume execution" },
|
||||
o = { "<cmd>lua require('dap').step_over()<cr>", "Step over code" },
|
||||
i = { "<cmd>lua require('dap').step_into()<cr>", "Step into code" },
|
||||
r = { "<cmd>lua require('dap).repl.open()<cr>", "Inspect state" },
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user