Compare commits

...

3 Commits

Author SHA1 Message Date
fd3ee45800 vim: add keybind for diagnostics float
Some checks failed
Run nix flake check / flake-check (push) Failing after 37s
Periodic flake update / flake-update (push) Successful in 2m19s
2025-11-13 21:50:48 +01:00
0990d27147 vim: remove deprecated lspconfig stuff 2025-11-13 21:45:21 +01:00
8d2d646831 zsh: remove some junk from zshrc 2025-11-13 21:37:00 +01:00
3 changed files with 15 additions and 20 deletions

View File

@@ -1,4 +1,5 @@
-- Keybinds -- Keybinds
vim.keymap.set("n", "<Leader>ds", vim.diagnostic.open_float, { desc = "Show diagnostic" })
-- Term -- Term
vim.g.floaterm_keymap_toggle = '<leader>ft' vim.g.floaterm_keymap_toggle = '<leader>ft'

View File

@@ -21,8 +21,7 @@ lsp_zero.format_on_save({
}, },
}) })
-- LSP: go -- LSP: go
local lspconfig = require('lspconfig') vim.lsp.config("gopls", {
lspconfig.gopls.setup({
settings = { settings = {
gopls = { gopls = {
analyses = { analyses = {
@@ -33,6 +32,7 @@ lspconfig.gopls.setup({
} }
} }
}) })
vim.lsp.enable({ "gopls" })
-- GO: Automatically organize imports on save -- GO: Automatically organize imports on save
vim.api.nvim_create_autocmd("BufWritePre", { vim.api.nvim_create_autocmd("BufWritePre", {
@@ -59,7 +59,7 @@ vim.api.nvim_create_autocmd("BufWritePre", {
}) })
-- LSP: nix -- LSP: nix
lspconfig.nil_ls.setup({ vim.lsp.config("nil_ls", {
autostart = true, autostart = true,
settings = { settings = {
['nil'] = { ['nil'] = {
@@ -69,9 +69,10 @@ lspconfig.nil_ls.setup({
}, },
}, },
}) })
vim.lsp.enable({ "nil_ls" })
-- LSP: lua -- LSP: lua
lspconfig.lua_ls.setup({ vim.lsp.config("lua_ls", {
on_init = function(client) on_init = function(client)
local path = client.workspace_folders[1].name local path = client.workspace_folders[1].name
if vim.loop.fs_stat(path .. '/.luarc.json') or vim.loop.fs_stat(path .. '/.luarc.jsonc') then if vim.loop.fs_stat(path .. '/.luarc.json') or vim.loop.fs_stat(path .. '/.luarc.jsonc') then
@@ -110,9 +111,11 @@ lspconfig.lua_ls.setup({
} }
} }
}) })
vim.lsp.enable({ "lua_ls" })
-- LSP: ts/js -- LSP: ts/js
lspconfig.ts_ls.setup({ vim.lsp.config("ts_ls", {
init_options = { init_options = {
plugins = { plugins = {
}, },
@@ -123,16 +126,13 @@ lspconfig.ts_ls.setup({
"typescriptreact", "typescriptreact",
}, },
}) })
vim.lsp.enable({ "ts_ls" })
-- LSP: rust
lspconfig.rust_analyzer.setup {
}
-- LSP: python -- LSP: python
-- Ruff server -- Ruff server
lspconfig.ruff.setup({ vim.lsp.config("ruff", {
}) })
vim.lsp.enable({ "ruff" })
-- Ruff: automatically format on save -- Ruff: automatically format on save
vim.api.nvim_create_autocmd("BufWritePre", { vim.api.nvim_create_autocmd("BufWritePre", {
@@ -159,7 +159,7 @@ vim.api.nvim_create_autocmd("LspAttach", {
}) })
-- Pyright -- Pyright
lspconfig.pyright.setup { vim.lsp.config("pyright", {
settings = { settings = {
pyright = { pyright = {
-- Using Ruff's import organizer -- Using Ruff's import organizer
@@ -172,13 +172,8 @@ lspconfig.pyright.setup {
}, },
}, },
}, },
} })
vim.lsp.enable({ "pyright" })
-- LSP: C/C++
lspconfig.clangd.setup({})
-- LSP: zig
lspconfig.zls.setup({})
-- Telescope -- Telescope
require('telescope').setup({ require('telescope').setup({

View File

@@ -32,7 +32,6 @@
autoload -Uz promptinit autoload -Uz promptinit
promptinit promptinit
prompt pure prompt pure
export PATH="''${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
export MANPAGER="nvim +Man!" export MANPAGER="nvim +Man!"
export LOKI_ADDR="http://monitoring01:3100" export LOKI_ADDR="http://monitoring01:3100"