1
0

Merge Windows config

This commit is contained in:
2024-09-26 14:46:07 +02:00
parent 12b89714dc
commit 71f08e66aa
6 changed files with 162 additions and 59 deletions

View File

@ -34,13 +34,40 @@ return {
stopOnEntry = false,
}
}
dap.adapters.lldb = {
type = 'executable',
command = "C:\\Program Files\\LLVM\\bin\\lldb-dap.exe",
name = 'lldb'
}
-- Zig configuration
dap.configurations.zig = {
name = 'launch',
type= 'lldb',
request = 'launch',
program = '${workspaceFolder}/zig-out/bin/tests.exe',
cwd = '${workspaceFolder}',
}
-- Java configuration
-- See also ftplugin
dap.configurations.java = {
{
type = 'java';
request = 'launch';
name = "Launch file";
program = "java ${file}";
type = 'java',
request = 'launch',
name = "Launch file",
program = "java ${file}",
}}
dap.configurations.cpp = {{
name="launch",
type="lldb",
request="launch",
program = function ()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() ..'/', 'file')
end,
cwd = '${workspaceFolder}',
stopOnEntry = false,
args = {},
}}
dap.configurations.go = {
{
type = "delve",

View File

@ -1,9 +1,29 @@
return {
"folke/edgy.nvim",
event = "VeryLazy",
opts = {},
init = function ()
vim.opt.laststatus = 3
vim.opt.splitkeep = "screen"
end
}
return {
"folke/edgy.nvim",
event = "VeryLazy",
opts= {
bottom ={
{
ft = "toggleterm",
size = { height = 0.4 },
filter = function (_, win)
return vim.api.nvim_win_get_config(win).relative == ""
end,
},
{
ft = "lazyterm",
title = "Lazyterm",
size = { height = 0.4 },
filter = function(buf, _)
return not vim.b[buf].lazyterm_cmd
end
}
},
init = function ()
vim.opt.laststatus = 3
vim.opt.splitkeep = "screen"
end,
}
}

View File

@ -98,9 +98,41 @@ return
require("luasnip.loaders.from_lua").load({paths= "C:\\Users\\nigel\\AppData\\Local\\nvim\\lua\\snippets"})
-- Set up lspconfig.
local capabilities = require('cmp_nvim_lsp').default_capabilities()
local capabilities = require("cmp_nvim_lsp").default_capabilities()
local lsp = require("lspconfig")
end
}
local language_server = {
asm_lsp= true,
zls = true,
rust_analyzer = true,
jdtls = true,
pylsp = true,
clangd = {
capabilities = capabilities,
root_dir = require('lspconfig').util.root_pattern("compile_commands.json", "compile_flags.txt", ".git"),
cmd = {"clangd"},
filetypes = { "c", "cpp", "objc", "objcpp"},
settings = {
clangd = {
compilationDatabasePath = "compile-commands.json",
},
}
},
tsserver = true,
gopls = true
}
for name, config in pairs(language_server) do
if config == true then
config = {}
end
config = vim.tbl_deep_extend("force", {}, {
capabilities = capabilities,
}, config)
lsp[name].setup({})
end
end,
}

View File

@ -1,18 +1,30 @@
return {
"folke/tokyonight.nvim",
lazy = false,
priority = 1000,
opts = {},
config = function()
require("tokyonight").setup({
style = "night",
light_style = "day",
transparent = true,
terminal_colors = true,
dim_inactive = false,
lualine_bold = false,
})
-- return {
-- "folke/tokyonight.nvim",
-- lazy = false,
-- priority = 1000,
-- opts = {},
-- config = function()
-- require("tokyonight").setup({
-- style = "night",
-- light_style = "day",
-- transparent = true,
-- terminal_colors = true,
-- dim_inactive = false,
-- lualine_bold = false,
-- })
--
-- vim.cmd [[colorscheme tokyonight]]
-- end
-- }
vim.cmd [[colorscheme tokyonight]]
end
}
return {
{
"catppuccin/nvim",
name="catppuccin",
priority=1000,
config = function ()
require("catppuccin").setup()
vim.cmd.colorscheme = "catppuccin"
end
}
}

View File

@ -35,3 +35,15 @@ vim.api.nvim_create_autocmd('LspAttach', {
end,
})
--[[
-- Run zig test on save
-- TODO: fix vim.cmd call
-- TODO: only do this when a zig test file is open
vim.api.nvim_create_autocmd('BufWritePost' , {
callback = function ()
vim.cmd{cmd = '!zig' , args= {'test', vim.fn.expand('%')} }
end
})]]--