Compare commits

...

18 Commits

Author SHA1 Message Date
eba4afff84 added zls 2025-12-22 23:34:06 +01:00
Zam Kokott
0d78f3b576 Add which-key, lsp and dap and multiple keybinds 2025-12-10 14:46:41 +00:00
Zam Kokott
6073938c44 Add debugging, keymaps for tests and which-key 2025-12-04 08:49:57 +00:00
Zam Kokott
6d7b993478 Pulled 2025-11-28 08:18:27 +00:00
Pablu
fa32c992ca Add line numbers back, add vtsls and neotest go 2025-11-24 09:27:15 +01:00
Zam Kokott
b00d96f033 Add linter support, isort for formatters and use jedi instead of basedpyright 2025-11-17 11:33:36 +00:00
Zam Kokott
dd981c1a1f Add flash and C-d C-u 2025-11-12 15:15:57 +00:00
Pablu
42bbc0b55d Add telescope file finder 2025-11-12 15:21:18 +01:00
Zam Kokott
f7db5e3599 Add conform for foramtting and mason back for lsp installation but nothing more 2025-11-12 14:11:48 +00:00
Pablu
4acf9a7852 use oil instead of neotree 2025-11-12 14:31:06 +01:00
Pablu
d225638e1f Remove mason, cmp luasnip and lsp related stuff, added blink and nvim/lspconfig 2025-11-12 14:25:01 +01:00
Zam Kokott
7c0f9e6cca Add autoclose, tabout nvim autocomplete and Format on save 2025-11-12 11:15:38 +00:00
Pablu
418840eb27 Update treesitter 2025-11-06 18:06:17 +01:00
Pablu
f6e9194731 Update inline diagnostics 2025-11-06 18:03:58 +01:00
Zam Kokott
93b3ff7dda Move keybinds to init.lua, add neotest and tiny-inline 2025-11-06 17:01:18 +00:00
Zam Kokott
ed6bba05aa Remove comments and use default neovim comments, change pane split keybind, add GoBack, update neotree, update completions 2025-11-06 10:13:31 +01:00
353df255e1 Added pane support 2025-10-26 19:34:58 +01:00
Zam Kokott
abcbc64373 update 2025-10-06 09:31:42 +02:00
28 changed files with 396 additions and 327 deletions

165
init.lua
View File

@@ -1,67 +1,100 @@
if vim.g.vscode then
local vscode = require('vscode')
vim.g.mapleader = " "
vim.cmd("set clipboard+=unnamedplus")
vim.g.clipboard = vim.g.vscode_clipboard
local k = function(mode, lhs, rhs)
vim.keymap.set(mode, lhs, rhs, { expr = true }) -- expr is required
end
k("n", "<leader>gf", function()
vscode.action("editor.action.formatDocument")
end)
k("n", "K", function()
vscode.action("editor.action.showDefinitionPreviewHover")
end)
k("n", "gD", function()
vscode.action("editor.action.goToImplementation")
end)
k("n", "<leader>ca", function()
vscode.call("editor.action.quickFix")
end)
k("n", "<leader>dd", function()
vscode.call("workbench.actions.view.toggleProblems")
end)
k("n", "<leader>e", function()
vscode.call("workbench.view.explorer")
end)
k("v", "gc", function()
vscode.call("editor.action.commentLine", {
restore_selection=false
})
end)
k("n", "gcc", function()
vscode.call("editor.action.commentLine", {
restore_selection=false
})
end)
k("n", "<leader>cr", function()
vscode.call("editor.action.rename")
end)
else
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("vim-options")
require("lazy").setup("plugins")
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("vim-options")
require("lazy").setup("plugins")
vim.o.number = true
vim.o.relativenumber = true
-- Panes
vim.cmd.set("splitright")
vim.keymap.set("n", "<leader>/", function()
vim.cmd.vnew()
end, { desc = "Pane split right" })
vim.cmd.set("splitbelow")
vim.keymap.set("n", "<leader>-", function()
vim.cmd.new()
end, { desc = "Pane split down" })
vim.api.nvim_set_keymap('n', '<c-k>', ':wincmd k<CR>', { noremap = true, silent = true, desc = "Move to up windows" });
vim.api.nvim_set_keymap('n', '<c-h>', ':wincmd h<CR>', { noremap = true, silent = true, desc = "Move to left windows" });
vim.api.nvim_set_keymap('n', '<c-j>', ':wincmd j<CR>', { noremap = true, silent = true, desc = "Move to down windows" });
vim.api.nvim_set_keymap('n', '<c-l>', ':wincmd l<CR>', { noremap = true, silent = true, desc = "Move to right windows" });
vim.api.nvim_set_keymap('n', 'gb', ':bnext<CR>', { noremap = true, silent = true, desc = "Go back last buffer" });
vim.api.nvim_set_keymap('t', '<c-[><c-[>', '<C-\\><C-n>', { noremap = true, silent = true, desc = "Escape Terminal" });
vim.api.nvim_create_autocmd('TermOpen', {
group = vim.api.nvim_create_augroup('custom-term-open', { clear = true }),
callback = function()
vim.opt.number = false
vim.opt.relativenumber = false
end,
});
-- Telescope
local builtin = require("telescope.builtin")
vim.keymap.set('n', '<leader>fg', builtin.live_grep, { desc = "Telescope live grep" })
vim.keymap.set('n', 'gl', builtin.lsp_references, { desc = "Telescope show references" })
vim.keymap.set('n', '<leader>fx', builtin.diagnostics, { desc = "Telescope open diagnostics" })
vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = "Telescope find files" })
vim.keymap.set('n', '<leader>fb', builtin.buffers, { desc = "Telescope open buffers" })
-- Formating
vim.keymap.set("n", "<leader>gf", function()
require("conform").format({ lsp_format = "fallback" })
end, { desc = "Format buffer" })
-- Filesystem
vim.keymap.set("n", "<leader>e", ":Oil<CR>", { desc = "Open file explorer: OIL" })
-- Neotest
local neotest = require("neotest")
vim.keymap.set("n", "<leader>ts", function()
neotest.summary.toggle()
end, { desc = "Neotest open summary" })
vim.keymap.set("n", "<leader>to", neotest.output.open, { desc = "Neotest open output" })
vim.keymap.set("n", "<leader>td", function() neotest.run.run({ suite = false, strategy = "dap" }) end,
{ desc = "Neotest debug closest test" })
vim.keymap.set("n", "<leader>tr", function() neotest.run.run({ suite = false }) end,
{ desc = "Neotest run closest test" })
-- Debugging
local dap = require("dap")
vim.keymap.set("n", "<leader>db", dap.toggle_breakpoint,
{ nowait = true, remap = false, desc = "Debug toggle breakpoint" })
vim.keymap.set("n", "<leader>dc", dap.continue, { nowait = true, remap = false, desc = "Debug continue" })
vim.keymap.set("n", "<leader>di", dap.step_into, { nowait = true, remap = false, desc = "Debug step into" })
vim.keymap.set("n", "<leader>do", dap.step_over, { nowait = true, remap = false, desc = "Debug step over" })
vim.keymap.set("n", "<leader>dr", dap.repl.open, { nowait = true, remap = false, desc = "Debug open repl" })
vim.keymap.set("n", "<leader>dq", function()
dap.terminate()
require("dapui").close()
require("nvim-dap-virtual-text").toggle()
end, { nowait = true, remap = false, desc = "Debug close" })
vim.keymap.set("n", "<leader>dl", dap.list_breakpoints, { nowait = true, remap = false, desc = "Debug list breakpoints" })
-- Lsp Config
vim.keymap.set("n", "K", vim.lsp.buf.hover, { desc = "Show hover information" })
vim.keymap.set("n", "gd", vim.lsp.buf.definition, { desc = "Goto definition" })
vim.keymap.set({ "n", "v" }, "<leader>ca", vim.lsp.buf.code_action, { desc = "LSP code action" })
vim.keymap.set("n", "<leader>cr", vim.lsp.buf.rename, { desc = "LSP rename" })
-- Motions
vim.keymap.set("n", "<C-d>", "<C-d>zz", {})
vim.keymap.set("n", "<C-u>", "<C-u>zz", {})

View File

@@ -1,24 +1,33 @@
{
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
"LuaSnip": { "branch": "master", "commit": "de10d8414235b0a8cabfeba60d07c24304e71f5c" },
"catppuccin": { "branch": "main", "commit": "f67971cd3e30dd94061da8d61ee34742d43c632a" },
"cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
"harpoon": { "branch": "harpoon2", "commit": "ed1f853847ffd04b2b61c314865665e1dadf22c7" },
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
"lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "844d247d998c2f9a6a3baad8bb9748edc55ce69f" },
"mason.nvim": { "branch": "main", "commit": "9e25c98d4826998460926f8c5c2284848d80ae89" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "cea666ef965884414b1b71f6b39a537f9238bdb2" },
"none-ls.nvim": { "branch": "main", "commit": "46f2713c88a0b4e4bf134b59577659851ddd31cf" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
"nvim-lspconfig": { "branch": "master", "commit": "d0dbf489a8810672fa9a61f4a86e5cf89214b772" },
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
"autoclose.nvim": { "branch": "main", "commit": "3f86702b54a861a17d7994b2e32a7c648cb12fb1" },
"blink.cmp": { "branch": "main", "commit": "327fff91fe6af358e990be7be1ec8b78037d2138" },
"catppuccin": { "branch": "main", "commit": "234fc048de931a0e42ebcad675bf6559d75e23df" },
"conform.nvim": { "branch": "master", "commit": "cde4da5c1083d3527776fee69536107d98dae6c9" },
"fidget.nvim": { "branch": "main", "commit": "e32b672d8fd343f9d6a76944fedb8c61d7d8111a" },
"flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" },
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
"lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" },
"lualine.nvim": { "branch": "master", "commit": "3946f0122255bc377d14a59b27b609fb3ab25768" },
"mason-nvim-dap.nvim": { "branch": "main", "commit": "9a10e096703966335bd5c46c8c875d5b0690dade" },
"mason.nvim": { "branch": "main", "commit": "ad7146aa61dcaeb54fa900144d768f040090bff0" },
"mini.icons": { "branch": "main", "commit": "ff2e4f1d29f659cc2bad0f9256f2f6195c6b2428" },
"neotest": { "branch": "master", "commit": "deadfb1af5ce458742671ad3a013acb9a6b41178" },
"neotest-go": { "branch": "main", "commit": "59b50505053f9c45a9febb79e11a56206c3e3901" },
"neotest-python": { "branch": "master", "commit": "b0d3a861bd85689d8ed73f0590c47963a7eb1bf9" },
"nvim-dap": { "branch": "master", "commit": "5860c7c501eb428d3137ee22c522828d20cca0b3" },
"nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" },
"nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" },
"nvim-lint": { "branch": "master", "commit": "ebe535956106c60405b02220246e135910f6853d" },
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-web-devicons": { "branch": "master", "commit": "3362099de3368aa620a8105b19ed04c2053e38c0" },
"nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" },
"oil.nvim": { "branch": "master", "commit": "7e1cd7703ff2924d7038476dcbc04b950203b902" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"ripgrep": { "branch": "master", "commit": "cd1f981beafaeb9b61537e47e91314cea125400b" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope.nvim": { "branch": "master", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" },
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" }
"tiny-inline-diagnostic.nvim": { "branch": "main", "commit": "63dd87d195f28e01732e121c5ddfc0a74ccff54a" },
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
}

View File

@@ -0,0 +1,6 @@
return {
'm4xshen/autoclose.nvim',
config = function()
require('autoclose').setup()
end
}

8
lua/plugins/blink.lua Normal file
View File

@@ -0,0 +1,8 @@
return {
"saghen/blink.cmp",
dependecies = { "rafamadriz/friendly-snippets" },
version = "1.*",
opts = {
keymap = { preset = "enter" }
}
}

View File

@@ -5,9 +5,9 @@ return
priority = 1000,
lazy = false,
config = function()
require("catppuccin").setup({
transparent_background = true,
})
-- require("catppuccin").setup({
-- transparent_background = true,
-- })
vim.cmd.colorscheme "catppuccin"
end

View File

@@ -1,7 +0,0 @@
return {
'numToStr/Comment.nvim',
opts = {
-- add any options here
},
lazy = false,
}

View File

@@ -1,45 +0,0 @@
return {
{
"hrsh7th/cmp-nvim-lsp"
},
{
"L3MON4D3/LuaSnip",
dependencies = {
"saadparwaiz1/cmp_luasnip",
"rafamadriz/friendly-snippets",
},
},
{
"hrsh7th/nvim-cmp",
config = function()
local cmp = require("cmp")
require("luasnip.loaders.from_vscode").lazy_load()
cmp.setup({
snippet = {
-- REQUIRED - you must specify a snippet engine
expand = function(args)
require("luasnip").lsp_expand(args.body) -- For `luasnip` users.
end,
},
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
mapping = cmp.mapping.preset.insert({
["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.abort(),
["<CR>"] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
}),
sources = cmp.config.sources({
{ name = "nvim_lsp" },
{ name = "luasnip" }, -- For luasnip users.
}, {
{ name = "buffer" },
}),
})
end,
},
}

15
lua/plugins/conform.lua Normal file
View File

@@ -0,0 +1,15 @@
return {
"stevearc/conform.nvim",
config = function()
require("conform").setup {
formatters_by_ft = {
lua = { "stylua" },
python = { "isort", "black", lsp_format = "fallback" }
},
format_on_save = {
timeout_ms = 500,
lsp_format = "fallback"
}
}
end
}

77
lua/plugins/dap.lua Normal file
View File

@@ -0,0 +1,77 @@
return {
"mfussenegger/nvim-dap",
event = "VeryLazy",
dependencies = {
"rcarriga/nvim-dap-ui",
"nvim-neotest/nvim-nio",
"jay-babu/mason-nvim-dap.nvim",
"theHamsta/nvim-dap-virtual-text",
},
config = function()
local mason_dap = require("mason-nvim-dap")
local dap = require("dap")
local ui = require("dapui")
local dap_virtual_text = require("nvim-dap-virtual-text")
-- Dap Virtual Text
dap_virtual_text.setup()
mason_dap.setup({
ensure_installed = { "python" },
automatic_installation = true,
handlers = {
function(config)
require("mason-nvim-dap").default_setup(config)
end,
},
})
-- Configurations
dap.configurations = {
python = {
{
-- The first three options are required by nvim-dap
type = "python", -- the type here established the link to the adapter definition: `dap.adapters.python`
request = "launch",
name = "Launch file",
-- Options below are for debugpy, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings for supported options
program = "${file}", -- This configuration will launch the current file if used.
pythonPath = function()
-- debugpy supports launching an application with a different interpreter then the one used to launch debugpy itself.
-- The code below looks for a `venv` or `.venv` folder in the current directly and uses the python within.
-- You could adapt this - to for example use the `VIRTUAL_ENV` environment variable.
local cwd = vim.fn.getcwd()
if vim.fn.executable(cwd .. "/venv/bin/python") == 1 then
return cwd .. "/venv/bin/python"
elseif vim.fn.executable(cwd .. "/.venv/bin/python") == 1 then
return cwd .. "/.venv/bin/python"
else
return "/usr/bin/python"
end
end,
},
},
}
-- Dap UI
ui.setup()
vim.fn.sign_define("DapBreakpoint", { text = "🐞" })
dap.listeners.before.attach.dapui_config = function()
ui.open()
end
dap.listeners.before.launch.dapui_config = function()
ui.open()
end
dap.listeners.before.event_terminated.dapui_config = function()
ui.close()
end
dap.listeners.before.event_exited.dapui_config = function()
ui.close()
end
end
}

4
lua/plugins/fidget.lua Normal file
View File

@@ -0,0 +1,4 @@
return {
"j-hui/fidget.nvim",
opts = {}
}

9
lua/plugins/flash.lua Normal file
View File

@@ -0,0 +1,9 @@
return {
"folke/flash.nvim",
event = "VeryLazy",
---@type Flash.Config
opts = {},
keys = {
{ "zk", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
},
}

View File

@@ -1,44 +0,0 @@
return {
"ThePrimeagen/harpoon",
branch = "harpoon2",
dependencies = { "nvim-lua/plenary.nvim" },
config = function()
local harpoon = require("harpoon")
-- Setup Harpoon with Telescope
local conf = require("telescope.config").values
local function toggle_telescope(harpoon_files)
local file_paths = {}
for _, item in ipairs(harpoon_files.items) do
table.insert(file_paths, item.value)
end
require("telescope.pickers")
.new({}, {
prompt_title = "Harpoon",
finder = require("telescope.finders").new_table({
results = file_paths,
}),
previewer = conf.file_previewer({}),
sorter = conf.generic_sorter({}),
})
:find()
end
-- Setup Harpoon keybinds
harpoon:setup()
vim.keymap.set("n", "<leader>a", function()
harpoon:list():add()
end)
vim.keymap.set("n", "<C-e>", function()
toggle_telescope(harpoon:list())
end)
-- vim.keymap.set("n", "<A-p>", function()
-- harpoon:list():prev()
-- end)
-- vim.keymap.set("n", "<A-n>", function()
-- harpoon:list():next()
-- end)
end,
}

17
lua/plugins/linter.lua Normal file
View File

@@ -0,0 +1,17 @@
return {
'mfussenegger/nvim-lint',
config = function()
local lint = require("lint")
lint.linters_by_ft = {
python = { 'dmypy' }
}
local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true })
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
group = lint_augroup,
callback = function()
lint.try_lint()
end,
})
end
}

View File

@@ -1,66 +0,0 @@
return {
"neovim/nvim-lspconfig",
dependencies = {
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim",
},
config = function()
local capabilities = require("cmp_nvim_lsp").default_capabilities()
local handlers = {
-- ["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "rounded" }),
-- ["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = "rounded" }),
}
require("mason").setup()
require("mason-lspconfig").setup({
ensure_installed = {
"lua_ls",
"gopls",
"rust_analyzer",
"html",
"zls",
"pyright",
"ols",
"clangd",
"omnisharp",
"yamlls",
"svelte",
"templ",
"vtsls",
"vue_ls",
},
handlers = {
function(server_name)
require("lspconfig")[server_name].setup {
capabilities = capabilities,
handlers = handlers
}
end,
clangd = function()
local lspconfig = require("lspconfig")
lspconfig.clangd.setup({
capabilities = capabilities,
handlers = handlers,
init_options = {
fallbackFlags = { '--std=c++20' }
},
})
end,
}
})
local lspconfig = require("lspconfig")
lspconfig.gleam.setup({
capabilities = capabilities,
handlers = handlers,
cmd = { "gleam", "lsp" },
root_dir = lspconfig.util.root_pattern("gleam.toml", ".git"),
filetypes = { "gleam" },
})
vim.keymap.set("n", "K", vim.lsp.buf.hover, {})
vim.keymap.set("n", "gd", vim.lsp.buf.definition, {})
vim.keymap.set({ "n", "v" }, "<leader>ca", vim.lsp.buf.code_action, {})
vim.keymap.set("n", "<leader>cr", vim.lsp.buf.rename, {})
end,
}

23
lua/plugins/lsp.lua Normal file
View File

@@ -0,0 +1,23 @@
return {
"neovim/nvim-lspconfig",
config = function()
vim.lsp.enable({ "lua_ls", "basedpyright", "gopls", "html", "yamlls", "svelte-language-server", "clangd",
"ansiblels", "vtsls", "zls", "glsl_analyzer" })
-- Testing basedpyright atm, change to jedi idk
vim.lsp.config("basedpyright", {
settings = {
['basedpyright'] = {
analysis = {
typeCheckingMode = "basic",
inlayHints = {
variableTypes = true,
genericTypes = true,
},
autoFormatStrings = true,
}
}
}
})
end
}

View File

@@ -8,4 +8,4 @@ return {
}
})
end
}
}

4
lua/plugins/mason.lua Normal file
View File

@@ -0,0 +1,4 @@
return {
"mason-org/mason.nvim",
opts = {}
}

19
lua/plugins/neotest.lua Normal file
View File

@@ -0,0 +1,19 @@
return {
"nvim-neotest/neotest",
dependencies = {
"nvim-neotest/nvim-nio",
"nvim-neotest/neotest-python",
"nvim-neotest/neotest-go",
"nvim-lua/plenary.nvim",
"antoinemadec/FixCursorHold.nvim",
"nvim-treesitter/nvim-treesitter"
},
config = function()
require("neotest").setup({
adapters = {
require("neotest-python"),
require("neotest-go")
}
})
end
}

View File

@@ -1,34 +0,0 @@
return {
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons",
"MunifTanjim/nui.nvim",
},
config = function()
require("neo-tree").setup({
event_handlers = {
{
event = "file_opened",
handler = function(file_path)
require("neo-tree.command").execute({ action = "close" })
end,
},
},
filesystem = {
filtered_items = {
visible = false,
show_hidden_count = true,
hide_dotfiles = false,
hide_gitignored = true,
hide_by_name = {
'.git',
'bin',
},
},
},
})
vim.keymap.set("n", "<C-n>", ":Neotree filesystem reveal right toggle<CR>", {})
end,
}

View File

@@ -1,15 +0,0 @@
return {
"nvimtools/none-ls.nvim",
config = function()
local null_ls = require("null-ls")
null_ls.setup({
sources = {
null_ls.builtins.formatting.stylua,
null_ls.builtins.formatting.gofmt,
null_ls.builtins.formatting.prettierd,
null_ls.builtins.formatting.black
},
})
vim.keymap.set("n", "<leader>gf", vim.lsp.buf.format, {})
end,
}

10
lua/plugins/oil.lua Normal file
View File

@@ -0,0 +1,10 @@
return {
'stevearc/oil.nvim',
---@module 'oil'
---@type oil.SetupOpts
opts = {},
-- Optional dependencies
dependencies = { { "nvim-mini/mini.icons", opts = {} } },
-- Lazy loading is not recommended because it is very tricky to make it work correctly in all situations.
lazy = false,
}

View File

@@ -2,19 +2,17 @@ return {
{
'nvim-telescope/telescope.nvim',
tag = '0.1.6',
dependencies = { 'nvim-lua/plenary.nvim' },
config = function()
local builtin = require("telescope.builtin")
vim.keymap.set('n', '<C-p>', builtin.find_files, {})
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
vim.keymap.set('n', 'gl', builtin.lsp_references, {})
vim.keymap.set('n', '<leader>d', builtin.diagnostics, {})
end
dependencies = {
'nvim-lua/plenary.nvim',
'BurntSushi/ripgrep',
{ 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' }
},
},
{
'nvim-telescope/telescope-ui-select.nvim',
config = function()
require("telescope").setup({
local telescope = require("telescope")
telescope.setup({
extensions = {
["ui-select"] = {
require("telescope.themes").get_dropdown {
@@ -22,7 +20,9 @@ return {
}
}
})
require("telescope").load_extension("ui-select")
telescope.load_extension("ui-select")
telescope.load_extension("fzf")
end
}
}

View File

@@ -0,0 +1,19 @@
return {
"rachartier/tiny-inline-diagnostic.nvim",
event = "VeryLazy",
priority = 1000,
config = function()
require('tiny-inline-diagnostic').setup({
preset = "modern",
transparent_bg = true,
options = {
multilines = {
enabled = true,
always_show = true,
}
}
})
vim.diagnostic.config({ virtual_text = false }) -- Disable Neovim's default virtual text diagnostics
end,
}

View File

@@ -2,11 +2,13 @@ return {
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function()
local config = require("nvim-treesitter.configs")
config.setup({
ensure_installed = { "lua", "go", "zig", "markdown", "json", "yaml", "javascript", "typescript", "bash", "python", "c_sharp", "cpp", "gleam" },
highlight = { enable = true },
require("nvim-treesitter.configs").setup({
ensure_installed = { "lua", "go", "zig", "markdown", "json", "yaml", "javascript",
"typescript", "bash", "python", "c_sharp", "cpp", "gleam", "svelte" },
indent = { enable = true },
sync_install = false,
highlight = { enable = true },
})
local treesitter_parser_config = require("nvim-treesitter.parsers").get_parser_configs()

View File

@@ -1,11 +0,0 @@
return {
"folke/trouble.nvim",
opts = {},
cmd = "Trouble",
keys = {
{
"<leader>dd",
"<cmd>Trouble diagnostics toggle<cr>"
}
}
}

View File

@@ -0,0 +1,11 @@
return {
"folke/lazydev.nvim",
ft = "lua", -- only load on lua files
opts = {
library = {
-- See the configuration section for more details
-- Load luvit types when the `vim.uv` word is found
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
},
},
}

27
lua/plugins/which-key.lua Normal file
View File

@@ -0,0 +1,27 @@
return {
"folke/which-key.nvim",
event = "VeryLazy",
opts = {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
},
keys = {
{
"<leader>?",
function()
require("which-key").show({ global = false })
end,
desc = "Buffer Local Keymaps (which-key)",
},
},
config = function()
local wk = require("which-key")
wk.add({
{ "<leader>d", group = "Debug" },
{ "<leader>f", group = "Telescope" },
{ "<leader>t", group = "Test" },
{ "<leader>c", group = "Code" },
})
end
}

View File

@@ -3,11 +3,9 @@ vim.cmd("set tabstop=2")
vim.cmd("set softtabstop=2")
vim.cmd("set shiftwidth=2")
vim.cmd("set expandtab")
vim.cmd("set number")
vim.cmd("set clipboard+=unnamedplus")
vim.cmd("highlight Normal guibg=none")
vim.cmd("highlight NonText guibg=none")
vim.cmd("highlight Normal ctermbg=none")
vim.cmd("highlight NonText ctermbg=none")
vim.o.winborder='rounded'
vim.o.winborder = 'rounded'