nvim: config diet

This commit is contained in:
mequidis
2022-11-04 23:04:29 +02:00
parent 44be04b584
commit cbdcca8bfb
8 changed files with 21 additions and 220 deletions

View File

@ -1,35 +0,0 @@
-- settings
vim.g.nvimgdb_use_find_executables = 0
vim.g.nvimgdb_use_cmake_to_find_executables = 0
vim.g.nvimgdb_disable_start_keymaps = 1
-- filetype mappings
vim.api.nvim_create_autocmd({ "FileType" }, {
pattern = "python",
callback = function()
vim.keymap.set("n", "<leader>dd", ":GdbStartPDB python -m pdb ")
end,
})
vim.api.nvim_create_autocmd({ "FileType" }, {
pattern = "rust",
callback = function()
vim.keymap.set("n", "<leader>dd", ":GdbStart rust-gdb target/debug/")
end,
})
vim.api.nvim_create_autocmd({ "FileType" }, {
pattern = { "go", "c" },
callback = function()
vim.keymap.set("n", "<leader>dd", ":GdbStart gdb -q ")
end,
})
-- other mappings
vim.keymap.set("n", "<leader>db", "<cmd>GdbBreakpointToggle<CR>")
vim.keymap.set("n", "<leader>dc", "<cmd>GdbContinue<CR>")
vim.keymap.set("n", "<leader>du", "<cmd>GdbUntil<CR>")
vim.keymap.set("n", "<leader>ds", "<cmd>GdbStep<CR>")
vim.keymap.set("n", "<leader>dn", "<cmd>GdbNext<CR>")
vim.keymap.set("n", "<leader>do", "<cmd>GdbFinish<CR>")
vim.keymap.set("n", "<leader>dw", ":GdbCreateWatch ")

View File

@ -1,5 +1,5 @@
require("lint").linters_by_ft = {
-- python = { "mypy" },
python = { "mypy" },
}
vim.cmd("au BufWrite <buffer> lua require('lint').try_lint()")

View File

@ -1,42 +1,14 @@
local lsp = require("lspconfig")
-- language servers
lsp.pyright.setup({
settings = {
python = {
analysis = {
typeCheckingMode = "off",
diagnosticMode = "workspace",
},
},
},
})
-- lsp.pylsp.setup({})
lsp.gopls.setup({})
lsp.clangd.setup({})
lsp.texlab.setup({})
lsp.tsserver.setup({})
lsp.svelte.setup({})
lsp.rust_analyzer.setup({})
lsp.sumneko_lua.setup({
settings = {
Lua = {
runtime = {
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
version = "LuaJIT",
},
diagnostics = {
-- Get the language server to recognize the `vim` global
globals = { "vim" },
},
workspace = {
-- Make the server aware of Neovim runtime files
library = vim.api.nvim_get_runtime_file("", true),
},
-- Do not send telemetry data containing a randomized but unique identifier
telemetry = {
enable = false,
},
},
},
})
-- lsp.pyright.setup({
-- settings = {
-- python = {
-- analysis = {
-- typeCheckingMode = "off",
-- diagnosticMode = "workspace",
-- },
-- },
-- },
-- })
require("lspconfig").jedi_language_server.setup({})

View File

@ -1,7 +0,0 @@
-- ignore certain errors
-- vim.g.vimtex_quickfix_ignore_filters = { "Underfull", "Overfull", "babel" }
-- use zathura as the pdf viewer
vim.g.vimtex_view_general_viewer = "zathura"
vim.g.vimtex_compiler_latexmk_engines = { _ = "-lualatex" }

View File

@ -1,81 +0,0 @@
local wk = require("which-key")
wk.register({
a = {
name = "Actions",
r = "Reload Config",
c = "Find Config Files",
},
d = {
name = "Debug",
b = "Toggle Breakpoint",
f = "Finish / Step Out",
n = "Next",
s = "Step Into",
u = "Until",
w = "Create Watch",
},
g = {
name = "Language",
D = "Go To Declaration",
a = "Code Actions",
d = "Go To Definition",
e = "Show Line Diagnostics",
f = "Format Code",
F = "Format Code And Write Changes",
i = "Show Implementations",
k = "Hover",
n = "Rename",
q = "Show Diagnostics",
r = "Show References",
s = "Restart LSP Server",
t = "Show Type Definition",
},
o = {
name = "Org",
a = "Agenda",
c = "Capture",
f = "Find Org Files",
},
s = {
name = "Splits & Buffers",
v = "Vertical Split",
z = "Horizontal Split Split",
t = "New Tab",
b = "Show Buffers",
h = "Left Tab",
l = "Right Tab",
},
t = {
name = "Telescope",
w = "Workspace Symbols",
d = "Document Symbols",
o = "Old Files",
g = "Grep",
s = "Treesitter",
},
v = {
name = "Version Control (git)",
A = "Add",
a = "Add Everything (add .)",
c = "Commit",
f = "Fetch",
g = "Git",
l = "Pull",
p = "Push",
s = "Status",
},
C = "Terminal",
F = "Fuzzy Files",
Q = "Quit All",
S = "Save All",
X = "Quit All Without Saving",
c = "Toggle All Terminal",
f = "File Manager",
h = "Left Split",
j = "Down Split",
k = "Up Split",
l = "Right Split",
q = "Quit",
x = "Quit Without Saving",
}, { prefix = "<leader>" })
wk.setup({})