Compare commits
12 Commits
30e94f86f0
...
3ccd1f3bb8
Author | SHA1 | Date |
---|---|---|
|
3ccd1f3bb8 | |
|
cc765b7b61 | |
|
858daa428f | |
|
27c34ed642 | |
|
72ff506c30 | |
|
c3af31dab4 | |
|
e15bb92e27 | |
|
e7547cf9e7 | |
|
dc156ed65f | |
|
4d6fff0bf2 | |
|
9da90d53fa | |
|
227d4ab17a |
|
@ -0,0 +1,14 @@
|
|||
require("which-key").add({
|
||||
"<leader>co",
|
||||
function()
|
||||
vim.lsp.buf.code_action({
|
||||
apply = true,
|
||||
context = {
|
||||
only = { "source.organizeImports" }, -- Or the specific ruff identifier if known
|
||||
},
|
||||
bufnr = vim.api.nvim_get_current_buf(),
|
||||
})
|
||||
end
|
||||
,
|
||||
name = "Organize Imports"
|
||||
})
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"blink.cmp": { "branch": "main", "commit": "cb5e346d9e0efa7a3eee7fd4da0b690c48d2a98e" },
|
||||
"blink.cmp": { "branch": "main", "commit": "4f38ce99a472932d5776337f08f7a8180f1f571a" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "9cd665f46ab7af2e49d140d328b8e72ea1cf511b" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "43b0c856ae5f32a195d83f4a27fe21d63e6c966c" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||
"material.nvim": { "branch": "main", "commit": "96285a62923ea8e38aea7b603099752da2a97e97" },
|
||||
"mini.cursorword": { "branch": "main", "commit": "7d1b38a17834acbbc4feff8e42aedc4ed0c6ff06" },
|
||||
|
@ -9,11 +9,11 @@
|
|||
"mini.pairs": { "branch": "main", "commit": "7e834c5937d95364cc1740e20d673afe2d034cdb" },
|
||||
"noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" },
|
||||
"nord.nvim": { "branch": "main", "commit": "1ee184dfd06ffadc19b7afc0ba4c5eca92dd836e" },
|
||||
"nui.nvim": { "branch": "main", "commit": "8d5b0b568517935d3c84f257f272ef004d9f5a59" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "88d0824d85c0f74a012521d25678a5b01c76feb1" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "3b308861a8d7d7bfbe9be51d52e54dcfd9fe3d38" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "50b5b06bff13a9b4eab946de7c7033649a6618a1" },
|
||||
"rustaceanvim": { "branch": "master", "commit": "3a6af933d5870a419ee2be6e1bd397dfe46c96d2" },
|
||||
"nui.nvim": { "branch": "main", "commit": "f535005e6ad1016383f24e39559833759453564e" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "61e5109c8cf24807e4ae29813a3a82b31821dd45" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "066fd6505377e3fd4aa219e61ce94c2b8bdb0b79" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "f1420728f59843eb2ef084406b3d0201a0a0932d" },
|
||||
"rustaceanvim": { "branch": "master", "commit": "01b28c60abde5cb79c0129e66c465699e78b0e6d" },
|
||||
"snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
require("which-key").add({
|
||||
{ "<leader>b", group = "buffer" },
|
||||
{ "<leader>bd", ":bd<CR>", name = "delete current" },
|
||||
{ "<leader>bd", Snacks.bufdelete.delete, name = "delete current" },
|
||||
{ "<leader>bo", Snacks.bufdelete.other, name = "delete others" },
|
||||
{ "<leader>bk", ":noa w<CR>", name = "write w/out format" },
|
||||
|
||||
{ "<leader>c", group = "code" },
|
||||
{ "<leader>ca", vim.lsp.buf.code_action, name = "code action" },
|
||||
{ "<leader>cd", vim.diagnostic.open_float, name = "diagnostic" },
|
||||
{ "<leader>cr", vim.lsp.buf.rename, name = "rename" },
|
||||
|
||||
{ "<leader>e", Snacks.explorer.open, name = "explorer" },
|
||||
|
||||
|
@ -20,11 +23,12 @@ require("which-key").add({
|
|||
{ "<leader>gbl", ":Gitsigns toggle_current_line_blame<CR>", name = "virtual text" },
|
||||
{ "<leader>gh", group = "hunk" },
|
||||
{ "<leader>ghr", ":Gitsigns reset_hunk<CR>", name = "reset hunk" },
|
||||
{ "<leader>ghp", ":Gitsigns preview_hunk<CR>", name = "reset hunk" },
|
||||
{ "<leader>ghp", ":Gitsigns preview_hunk<CR>", name = "preview hunk" },
|
||||
|
||||
{ "<leader>s", group = "search" },
|
||||
{ "<leader>ss", Snacks.picker.lsp_workspace_symbols, name = "symbols" },
|
||||
{ "<leader>sg", Snacks.picker.grep, name = "grep" },
|
||||
{ "<leader>sn", Snacks.picker.notifications, name = "notifications" },
|
||||
|
||||
{ "<leader>u", group = "ui" },
|
||||
{ "<leader>ut", Snacks.picker.colorschemes, name = "colorschemes" },
|
||||
|
@ -70,6 +74,9 @@ require("which-key").add({
|
|||
end,
|
||||
name = "Next Hunk",
|
||||
},
|
||||
|
||||
{ "[h", function() require("gitsigns").nav_hunk("prev") end, name = "previous hunk" },
|
||||
{ "]h", function() require("gitsigns").nav_hunk("next") end, name = "next hunk" },
|
||||
})
|
||||
|
||||
Snacks.toggle.diagnostics():map("<leader>ud")
|
||||
|
|
|
@ -1,9 +1,27 @@
|
|||
local capabilities = require("blink.cmp").get_lsp_capabilities()
|
||||
|
||||
require("lspconfig").basedpyright.setup({ capabilities = capabilities })
|
||||
require("lspconfig").ruff.setup({ capabilities = capabilities })
|
||||
vim.lsp.config("basedpyright", { capabilities = capabilities })
|
||||
vim.lsp.config("ruff", { capabilities = capabilities })
|
||||
vim.lsp.enable({ "basedpyright", "ruff" })
|
||||
|
||||
require("lspconfig").lua_ls.setup({
|
||||
-- npm i -g bash-language-server
|
||||
-- Also install shellcheck using system package manager.
|
||||
vim.lsp.config("bashls", { capabilities = capabilities })
|
||||
vim.lsp.enable("bashls")
|
||||
|
||||
-- cargo install --features lsp --locked taplo-cli
|
||||
-- (For toml)
|
||||
vim.lsp.config("taplo", { capabilities = capabilities })
|
||||
vim.lsp.enable("taplo")
|
||||
|
||||
-- npm i -g yaml-language-server
|
||||
vim.lsp.config("yamlls", { capabilities = capabilities })
|
||||
vim.lsp.enable("yamlls")
|
||||
|
||||
vim.lsp.config("ccls", { capabilities = capabilities })
|
||||
vim.lsp.enable("ccls")
|
||||
|
||||
vim.lsp.config("lua_ls", {
|
||||
on_init = function(client)
|
||||
if client.workspace_folders then
|
||||
local path = client.workspace_folders[1].name
|
||||
|
@ -35,6 +53,8 @@ require("lspconfig").lua_ls.setup({
|
|||
},
|
||||
capabilities = capabilities,
|
||||
})
|
||||
vim.lsp.enable("lua_ls")
|
||||
|
||||
|
||||
vim.g.rustaceanvim = {
|
||||
-- Plugin configuration
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
vim.opt.termguicolors = true
|
||||
vim.cmd("colorscheme tokyonight")
|
||||
|
||||
vim.o.shiftwidth = 4
|
||||
vim.o.expandtab = true
|
||||
vim.o.smartindent = true
|
||||
vim.wo.number = true
|
||||
vim.wo.relativenumber = true
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ return {
|
|||
version = "1.*",
|
||||
opts = {
|
||||
keymap = {
|
||||
preset = "enter",
|
||||
preset = "super-tab",
|
||||
},
|
||||
sources = {
|
||||
default = { "lsp", "path", "buffer" },
|
||||
|
|
|
@ -2,8 +2,17 @@ return {
|
|||
"folke/snacks.nvim",
|
||||
priority = 1000,
|
||||
opts = {
|
||||
picker = {},
|
||||
-- This one could probably be replaced with a custom function.
|
||||
bufdelete = { enable = true },
|
||||
picker = {
|
||||
sources = {
|
||||
explorer = {
|
||||
auto_close = true,
|
||||
}
|
||||
}
|
||||
},
|
||||
explorer = {},
|
||||
notifier = {},
|
||||
toggle = {},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue