few fixes to nvim config

This commit is contained in:
Kulvir Singh
2025-01-17 19:47:09 +05:30
parent 424dadd45f
commit 37ca2b3724
10 changed files with 22 additions and 56 deletions

24
flake.lock generated
View File

@@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1736349844, "lastModified": 1737120639,
"narHash": "sha256-jpmKC8zNcFMt9ATsju2mryBuimIm+bR7HETCp0Rxd3s=", "narHash": "sha256-p5e/45V41YD3tMELuiNIoVCa25/w4nhOTm0B9MtdHFI=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "fcc4259cdbcb76138b48ed36b4f41c521910db0d", "rev": "a0046af169ce7b1da503974e1b22c48ef4d71887",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -27,11 +27,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1736085891, "lastModified": 1737085297,
"narHash": "sha256-bTl9fcUo767VaSx4Q5kFhwiDpFQhBKna7lNbGsqCQiA=", "narHash": "sha256-0gpgsX7hCauT6pblVg+hrDnt83lPoYzq/2BqqyvU8Tc=",
"owner": "LnL7", "owner": "LnL7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "ba9b3173b0f642ada42b78fb9dfc37ca82266f6c", "rev": "09414c7e2def24a5c52e588017b8524bcb68972a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -42,11 +42,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1736241350, "lastModified": 1737003892,
"narHash": "sha256-CHd7yhaDigUuJyDeX0SADbTM9FXfiWaeNyY34FL1wQU=", "narHash": "sha256-RCzJE9wKByLCXmRBp+z8LK9EgdW+K+W/DXnJS4S/NVo=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "8c9fd3e564728e90829ee7dbac6edc972971cd0f", "rev": "ae06b9c2d83cb5c8b12d7d0e32692e93d1379713",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -58,11 +58,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1736344604, "lastModified": 1737116815,
"narHash": "sha256-sKX29IV8KxIAAEbTi2tsgVKjovHbwZoFnNE7wb22d6k=", "narHash": "sha256-eQh4gikqS2AX1QP4JK48fY1hxO42nqbpiI+PKxf5jrg=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "4dbf4eca6ae8b69d71dcb43295c57bbb2542bb7c", "rev": "7b12d41769470b1483c04ee8a67b75c0c302c42f",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -24,6 +24,6 @@
# https://github.com/NixOS/nix/issues/7273 # https://github.com/NixOS/nix/issues/7273
nix.settings = { nix.settings = {
auto-optimise-store = false; auto-optimise-store = false;
}; };
} }

View File

@@ -1,28 +0,0 @@
return {
-- "EdenEast/nightfox.nvim",
-- lazy = false,
-- priority = 1000,
-- init = function()
-- require("nightfox").setup {
-- transparent_background = true,
-- }
-- vim.cmd.colorscheme "carbonfox"
--
-- vim.cmd.hi "Comment gui=none"
-- vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
-- vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
-- vim.api.nvim_set_hl(0, "NormalNC", { bg = "none" })
--
-- vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {
-- border = "rounded",
-- })
--
-- vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, {
-- border = "rounded",
-- })
--
-- vim.diagnostic.config {
-- float = { border = "rounded" },
-- }
-- end,
}

View File

@@ -12,7 +12,7 @@ return {
formatters_by_ft = { formatters_by_ft = {
c = { "clang-format" }, c = { "clang-format" },
css = { "prettier" }, css = { "prettier" },
go = { "gofumpt", "goimports_reviser" }, go = { "gofumpt", "goimports-reviser" },
html = { "prettier" }, html = { "prettier" },
lua = { "stylua" }, lua = { "stylua" },
typescript = { "prettier" }, typescript = { "prettier" },

View File

@@ -1,5 +0,0 @@
return {
"tpope/vim-dadbod",
"kristijanhusak/vim-dadbod-completion",
"kristijanhusak/vim-dadbod-ui",
}

View File

@@ -16,7 +16,6 @@ return {
-- GO DEBUG -- GO DEBUG
"leoluz/nvim-dap-go", "leoluz/nvim-dap-go",
"mfussenegger/nvim-dap-python",
}, },
config = function() config = function()
local dap = require "dap" local dap = require "dap"
@@ -56,6 +55,7 @@ return {
}, },
} }
-- the very common keybind `<leader>db` overlaps with some other keybind
vim.keymap.set("n", "<leader>dt", dap.toggle_breakpoint, { desc = "Debug: Toggle Breakpoint" }) vim.keymap.set("n", "<leader>dt", dap.toggle_breakpoint, { desc = "Debug: Toggle Breakpoint" })
vim.keymap.set("n", "<Space>?", function() vim.keymap.set("n", "<Space>?", function()
@@ -84,6 +84,5 @@ return {
end end
require("dap-go").setup() require("dap-go").setup()
require("dap-python").setup "~/.local/share/nvim/mason/packages/debugpy/venv/bin/python"
end, end,
} }

View File

@@ -6,7 +6,7 @@ return {
local lint = require "lint" local lint = require "lint"
lint.linters_by_ft = { lint.linters_by_ft = {
python = { "ruff", "mypy" }, -- python = { "ruff", "mypy" },
dockerfile = { "hadolint" }, dockerfile = { "hadolint" },
json = { "jsonlint" }, json = { "jsonlint" },
markdown = { "vale" }, markdown = { "vale" },

View File

@@ -67,9 +67,9 @@ return {
"goimports-reviser", "goimports-reviser",
"hadolint", "hadolint",
"jsonlint", "jsonlint",
"mypy", -- "mypy",
"prettier", "prettier",
"ruff", -- "ruff",
"stylua", "stylua",
"vale", "vale",
}) })
@@ -131,7 +131,7 @@ return {
-- Execute a code action, usually your cursor needs to be on top of an error -- Execute a code action, usually your cursor needs to be on top of an error
-- or a suggestion from your LSP for this to activate. -- or a suggestion from your LSP for this to activate.
map("<leader>ca", vim.lsp.buf.code_action, "[C]ode [A]ction") map(vim.lsp.buf.code_action, "[C]ode [A]ction", "<leader>ca")
-- Opens a popup that displays documentation about the word under your cursor -- Opens a popup that displays documentation about the word under your cursor
-- See `:help K` for why this keymap. -- See `:help K` for why this keymap.

View File

@@ -22,8 +22,8 @@ return {
---@diagnostic disable-next-line: duplicate-set-field ---@diagnostic disable-next-line: duplicate-set-field
statusline.active = function() statusline.active = function()
local mode, mode_hl = statusline.section_mode { trunc_width = 120 } local mode, mode_hl = statusline.section_mode { trunc_width = 120 }
local git = statusline.section_git {} local git = statusline.section_git
local diagnostics = statusline.section_diagnostics { trunc_width = 75 } local diagnostics = statusline.section_diagnostics
local filename = statusline.section_filename { trunc_width = 140 } local filename = statusline.section_filename { trunc_width = 140 }
-- local fileinfo = statusline.section_fileinfo() -- local fileinfo = statusline.section_fileinfo()
local location = statusline.section_location() local location = statusline.section_location()

View File

@@ -5,7 +5,7 @@ return {
"nvim-treesitter/nvim-treesitter-textobjects", "nvim-treesitter/nvim-treesitter-textobjects",
}, },
opts = { opts = {
ensure_installed = { "c", "go", "html", "lua", "python", "typescript", "tsx" }, ensure_installed = { "go", "lua" },
auto_install = true, auto_install = true,
highlight = { highlight = {
enable = true, enable = true,