aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/nvim
diff options
context:
space:
mode:
authorToby Vincent <tobyv13@gmail.com>2022-11-30 17:31:12 -0600
committerToby Vincent <tobyv13@gmail.com>2022-11-30 17:31:12 -0600
commit19735c1469cd82dc6834f1ad326b6e32236dc048 (patch)
treeae46ed70ed75da42b9b62a0a048dec0ad2a4b4d1 /nvim
parent8cadf66e97119352313f011df4ccb8c3db0b95f1 (diff)
feat(nvim): add setup for c
Diffstat (limited to 'nvim')
-rw-r--r--nvim/.config/nvim/lua/tobyvin/autocmds.lua2
-rw-r--r--nvim/.config/nvim/lua/tobyvin/lsp/configs.lua20
-rw-r--r--nvim/.config/nvim/lua/tobyvin/plugins/dap.lua2
-rw-r--r--nvim/.config/nvim/lua/tobyvin/plugins/dap/configs.lua43
4 files changed, 36 insertions, 31 deletions
diff --git a/nvim/.config/nvim/lua/tobyvin/autocmds.lua b/nvim/.config/nvim/lua/tobyvin/autocmds.lua
index c322739..ba02592 100644
--- a/nvim/.config/nvim/lua/tobyvin/autocmds.lua
+++ b/nvim/.config/nvim/lua/tobyvin/autocmds.lua
@@ -34,7 +34,7 @@ vim.api.nvim_create_autocmd("BufWritePre", {
vim.api.nvim_create_autocmd("FileType", {
group = vim.api.nvim_create_augroup("tobyvin_tabstop", { clear = true }),
- pattern = { "sh", "zsh", "xml", "html", "xhtml", "css", "scss", "javascript", "lua", "dart", "markdown" },
+ pattern = { "c", "sh", "zsh", "xml", "html", "xhtml", "css", "scss", "javascript", "lua", "dart", "markdown" },
callback = function(args)
vim.bo[args.buf].tabstop = 2
end,
diff --git a/nvim/.config/nvim/lua/tobyvin/lsp/configs.lua b/nvim/.config/nvim/lua/tobyvin/lsp/configs.lua
index bb4daf1..381664a 100644
--- a/nvim/.config/nvim/lua/tobyvin/lsp/configs.lua
+++ b/nvim/.config/nvim/lua/tobyvin/lsp/configs.lua
@@ -6,25 +6,7 @@ local configs = {
cssls = {},
cssmodules_ls = {},
stylelint_lsp = {},
- ccls = {},
-}
-
-configs.pylsp = {
- settings = {
- pylsp = {
- plugins = {
- autopep8 = {
- enabled = false,
- },
- yapf = {
- enabled = false,
- },
- pylint = {
- enabled = true,
- },
- },
- },
- },
+ clangd = {},
}
configs.gopls = {
diff --git a/nvim/.config/nvim/lua/tobyvin/plugins/dap.lua b/nvim/.config/nvim/lua/tobyvin/plugins/dap.lua
index 9126e33..4ae19b6 100644
--- a/nvim/.config/nvim/lua/tobyvin/plugins/dap.lua
+++ b/nvim/.config/nvim/lua/tobyvin/plugins/dap.lua
@@ -65,7 +65,7 @@ M.hover.setup()
for name, config in pairs(M.configs) do
if dap.configurations[name] == nil then
- dap.configurations[name] = make_config(config)
+ dap.configurations[name] = config
end
end
diff --git a/nvim/.config/nvim/lua/tobyvin/plugins/dap/configs.lua b/nvim/.config/nvim/lua/tobyvin/plugins/dap/configs.lua
index ba38b54..4b5d7b9 100644
--- a/nvim/.config/nvim/lua/tobyvin/plugins/dap/configs.lua
+++ b/nvim/.config/nvim/lua/tobyvin/plugins/dap/configs.lua
@@ -12,7 +12,7 @@ local select_executable = function(cwd)
local command, args
for finder, finder_args in pairs(finders) do
- if vim.fn.executable("fdfind") == 1 then
+ if vim.fn.executable(finder) == 1 then
command = finder
args = finder_args
end
@@ -20,6 +20,7 @@ local select_executable = function(cwd)
if command == nil then
vim.notify("Failed to locate finder tool", vim.log.levels.ERROR, { title = "[dap.configs] select_executable" })
+ return
end
local items = Job:new({
@@ -57,17 +58,39 @@ M.lua = {
}
M.c = {
- name = "Launch file",
- type = "codelldb",
- request = "launch",
- program = select_executable,
- cwd = "${workspaceFolder}",
- stopOnEntry = false,
- runInTerminal = false,
+ {
+ name = "Launch c file",
+ type = "codelldb",
+ request = "launch",
+ program = select_executable,
+ cwd = "${workspaceFolder}",
+ stopOnEntry = false,
+ runInTerminal = false,
+ },
}
-M.cpp = M.c
+M.cpp = {
+ {
+ name = "Launch c++ file",
+ type = "codelldb",
+ request = "launch",
+ program = select_executable,
+ cwd = "${workspaceFolder}",
+ stopOnEntry = false,
+ runInTerminal = false,
+ },
+}
-M.rust = M.c
+M.rust = {
+ {
+ name = "Launch rust file",
+ type = "codelldb",
+ request = "launch",
+ program = select_executable,
+ cwd = "${workspaceFolder}",
+ stopOnEntry = false,
+ runInTerminal = false,
+ },
+}
return M