commit 3edcac6650246cc867626865c81c56caef48b1df parent 8a935471be56aba0560c8064c032be9779084676 Author: Linus <93053722+linusbehrens@users.noreply.github.com> Date: Fri, 18 Jul 2025 15:07:20 +0200 Merge pull request #1 from linusbehrens/tmp neovim stuff Diffstat:
22 files changed, 316 insertions(+), 269 deletions(-)
diff --git a/.config/bash/.bashrc b/.config/bash/.bashrc @@ -58,8 +58,8 @@ alias ne='neofetch' export GPG_TTY=$(tty) export PATH="$PATH:/opt/homebrew/bin" -export PATH="$PATH:/home/linus/.cargo/bin" export PATH="$HOME/.local/bin:$PATH" +export PATH="$HOME/.cargo/bin:$PATH" export PATH="$HOME/code/scripts/menu:$PATH" export PATH="$HOME/code/scripts:$PATH" export PLAN9=/Users/linus/.sources/plan9port @@ -67,7 +67,6 @@ export PATH=$PATH:$PLAN9/bin export XDG_CONFIG_HOME="$HOME/.config" export MANPAGER='nvim +Man!' - ########## PS1 ########## export EDITOR=vim diff --git a/.config/fish/conf.d/rustup.fish b/.config/fish/conf.d/rustup.fish @@ -0,0 +1 @@ +source "$HOME/.cargo/env.fish" diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json @@ -1,31 +1,30 @@ { "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, "LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" }, - "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, - "cmp-cmdline": { "branch": "main", "commit": "d126061b624e0af6c3a556428712dd4d4194ec6d" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" }, - "cmp-path": { "branch": "main", "commit": "e52e640b7befd8113b3350f46e8cfcfe98fcf730" }, - "cmp-tw2css": { "branch": "main", "commit": "1abe0eebcb57fcbd5538d054f0db61f4e4a1302b" }, "csvview.nvim": { "branch": "main", "commit": "2a2631ed90a9e6b038a6e3047b6cf332d5b45ff3" }, + "eyeliner.nvim": { "branch": "main", "commit": "8f197eb30cecdf4c2cc9988a5eecc6bc34c0c7d6" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "c2465eb07db648026eee81005a659abe26e6d077" }, + "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "a9c876d72d82b6640266f8b248ac05a63630b1d9" }, + "mason-null-ls.nvim": { "branch": "main", "commit": "de19726de7260c68d94691afb057fa73d3cc53e7" }, "mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" }, "neo-tree.nvim": { "branch": "v3.x", "commit": "cea666ef965884414b1b71f6b39a537f9238bdb2" }, - "no-neck-pain.nvim": { "branch": "main", "commit": "0b6e82a6f1db9ff0b694df2a8e3bd3f7828a3958" }, + "none-ls.nvim": { "branch": "main", "commit": "a5954f00ee88bcdf154e931198ec636a26a1077c" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, - "nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" }, - "nvim-lspconfig": { "branch": "master", "commit": "7fac9025a967a4d0846660f751cd392fac6bb788" }, + "nvim-lspconfig": { "branch": "master", "commit": "dbfd8da6206b4ab0e2fe9b72a538f82e2b410102" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, - "nvim-web-devicons": { "branch": "master", "commit": "19d6211c78169e78bab372b585b6fb17ad974e82" }, + "nvim-web-devicons": { "branch": "master", "commit": "0422a19d9aa3aad2c7e5cca167e5407b13407a9d" }, "persistence.nvim": { "branch": "main", "commit": "166a79a55bfa7a4db3e26fc031b4d92af71d0b51" }, "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, + "rustaceanvim": { "branch": "master", "commit": "709d35ca3a8e42ec855467de62d43f70f7adc656" }, "snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" }, "substitute.nvim": { "branch": "main", "commit": "9db749a880e3dd3b0eb57f698aa8f1e1630e1f25" }, "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, "transparent.nvim": { "branch": "main", "commit": "8ac59883de84e9cd1850ea25cf087031c5ba7d54" }, "trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" }, "typst-preview.nvim": { "branch": "master", "commit": "dea4525d5420b7c32eebda7de15a6beb9d6574fa" }, - "vague.nvim": { "branch": "main", "commit": "41b6b9a985c9091d0ec8571191e89d6950968cec" }, + "undotree": { "branch": "master", "commit": "28f2f54a34baff90ea6f4a735ef1813ad875c743" }, + "vague.nvim": { "branch": "main", "commit": "53b6060efb85a18c4587a39e5fb2c1071c719ab2" }, "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }, "zen-mode.nvim": { "branch": "main", "commit": "863f150ca321b3dd8aa1a2b69b5f411a220e144f" } } diff --git a/.config/nvim/lua/linus/extensions/buffer_picker.chat.lua b/.config/nvim/lua/linus/extensions/buffer_picker.chat.lua @@ -0,0 +1,72 @@ +local M = {} + +-- Get a list of open buffers and their names +local function get_buffers() + local buffers = {} + for _, bufnr in ipairs(vim.api.nvim_list_bufs()) do + if vim.api.nvim_buf_is_loaded(bufnr) and vim.fn.buflisted(bufnr) == 1 then + local name = vim.fn.bufname(bufnr) + table.insert(buffers, { nr = bufnr, name = name }) + end + end + return buffers +end + +-- Create the floating window and handle selection +function M.open_buffer_picker() + local buffers = get_buffers() + if #buffers == 0 then + print("No buffers found") + return + end + + local lines = {} + for _, b in ipairs(buffers) do + table.insert(lines, string.format("[%d] %s", b.nr, b.name)) + end + + local buf = vim.api.nvim_create_buf(false, true) + vim.api.nvim_buf_set_lines(buf, 0, -1, false, lines) + + -- Size and position + local width = math.floor(vim.o.columns * 0.6) + local height = #lines + local row = math.floor((vim.o.lines - height) / 2) + local col = math.floor((vim.o.columns - width) / 2) + + local win = vim.api.nvim_open_win(buf, true, { + relative = "editor", + width = width, + height = height, + row = row, + col = col, + style = "minimal", + border = "rounded", + }) + + -- Map <Enter> to switch buffer + vim.api.nvim_buf_set_keymap(buf, "n", "<CR>", "", { + noremap = true, + callback = function() + local line = vim.api.nvim_get_current_line() + local nr = tonumber(string.match(line, "%[(%d+)%]")) + if nr then + vim.cmd("b " .. nr) + vim.api.nvim_win_close(win, true) + end + end, + }) + + vim.api.nvim_buf_set_keymap(buf, "n", "q", "", { + noremap = true, + callback = function() + vim.api.nvim_win_close(win, true) + end, + }) +end + +-- Map the function to a command +vim.api.nvim_create_user_command("BufferPicker", M.open_buffer_picker, {}) + +return M + diff --git a/.config/nvim/lua/linus/keys.lua b/.config/nvim/lua/linus/keys.lua @@ -1,18 +1,37 @@ -- leader key auf space vim.g.mapleader = " " --- Setze die Navigationstasten auf die Bone-Positionen der ursprünglichen HJKL-Tasten -- vim.cmd("set langmap=bh,nj,rk,sl,mb,lr") -vim.keymap.set("n", "<leader>eu", ":ZenMode <CR>", { desc = "zen mode" }, { silent = true }) -vim.keymap.set("n", "<leader>ee", "<cmd>Neotree toggle float<CR>", { desc = "neotree toggle" }, { silent = true }) -vim.keymap.set("n", "<leader>eE", "<cmd>Neotree focus float<CR>", { desc = "neotree focus" }, { silent = true }) - -vim.keymap.set("n", "<leader>qw", "<cmd>write<cr>", { desc = "write" }, { silent = true }) -vim.keymap.set("n", "<leader>qq", "<cmd>quit<cr>", { desc = "quit" }) -vim.keymap.set("n", "<leader>qg", "<cmd>wq<cr>", { desc = "write and quit" }) - -vim.keymap.set("n", "<leader>r", "<cmd>redo<cr>", { desc = "redo" }) -vim.keymap.set("n", "<leader>,", ":", { desc = "cmd mode" }) +-- $HOME/.config/nvim/lua/linus/plugins/zen-mode.lua +vim.keymap.set("n", "<leader>eu", ":ZenMode <CR>", { desc = "zen mode" }, { silent = true }) +-- $HOME/.config/nvim/lua/linus/plugins/neotree.lua +vim.keymap.set("n", "<leader>ee", "<cmd>Neotree toggle float<CR>", { desc = "neotree toggle" }, { silent = true }) +vim.keymap.set("n", "<leader>eE", "<cmd>Neotree focus float<CR>", { desc = "neotree focus" }, { silent = true }) +-- netrw +vim.keymap.set("n", "<leader>nn", vim.cmd.Ex, { desc = "open netrw" }) +-- write and quit +vim.keymap.set("n", "<leader>qw", "<cmd>write<cr>", { desc = "write" }, { silent = true }) +vim.keymap.set("n", "<leader>qq", "<cmd>quit<cr>", { desc = "quit" }) +vim.keymap.set("n", "<leader>qg", "<cmd>wq<cr>", { desc = "write and quit" }) +-- redo +vim.keymap.set("n", "<leader>r", "<cmd>redo<cr>", { desc = "redo" }) +-- cmd +vim.keymap.set("n", "<leader>,", "<cmd>e $HOME/.config/nvim/lua/linus", { desc = "cmd mode" }) +-- $HOME/.config/nvim/lua/linus/plugins/telescope.lua +vim.keymap.set("n", "<leader><space>", "<cmd>Telescope find_files<cr>", { desc = "Find files" }) +vim.keymap.set("n", "<leader>en", "<cmd>Telescope find_files theme=dropdown<cr>", { desc = "Find file names" }) +vim.keymap.set("n", "<leader>er", "<cmd>Telescope oldfiles<cr>", { desc = "Find recent files" }) +vim.keymap.set("n", "<leader>es", "<cmd>Telescope live_grep<cr>", { desc = "grep files string" }) +vim.keymap.set("n", "<leader>ew", "<cmd>Telescope grep_string<cr>", { desc = "Find word under coursor" }) +vim.keymap.set("n", "<leader>et", "<cmd>Telescope grep_string search=TODO<cr>", { desc = "Find TODO" }) +-- $HOME/.config/nvim/lua/linus/plugins/undotree.lua +vim.keymap.set("n", "<leader>u", "vim.cmd.UndotreeToggle", { desc = "Toggle undo tree" }) +-- $HOME/.config/nvim/lua/linus/plugins/eyeliner.lua +vim.keymap.set("n", "<leader>ey", "vim.cmd.EyelinerToggle", { desc = "Toggle autocompletion (eyeliner)" }) +-- $HOME/.config/nvim/lua/linus/plugins/luasnip.lua +vim.keymap.set({ "i" }, "<C-e>", function() ls.expand() end, { silent = true}) +vim.keymap.set({ "i", "s" }, "<C-J>", function() ls.jump(1) end, { silent = true }) +vim.keymap.set({ "i", "s" }, "<C-K>", function() ls.jump(-1) end, { silent = true }) diff --git a/.config/nvim/lua/linus/plugins/eyeliner.lua b/.config/nvim/lua/linus/plugins/eyeliner.lua @@ -0,0 +1,14 @@ +-- Auto completion +return { + 'jinh0/eyeliner.nvim', + config = function() + require'eyeliner'.setup { + -- show highlights only after keypress + highlight_on_key = true, + } + end, +} + +-- Keymap +-- EyelinerToggle +-- /Users/linus/.config/nvim/lua/linus/keys.lua diff --git a/.config/nvim/lua/linus/plugins/lsp.lua b/.config/nvim/lua/linus/plugins/lsp.lua @@ -1,161 +1,35 @@ return { "neovim/nvim-lspconfig", dependencies = { - "williamboman/mason.nvim", - "williamboman/mason-lspconfig.nvim", - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-buffer", - "hrsh7th/cmp-path", - "hrsh7th/cmp-cmdline", - "jcha0713/cmp-tw2css", - "hrsh7th/nvim-cmp", - }, - - config = function() - -- Consistent ronding for boders - vim.diagnostic.config({ - float = { border = "rounded" } - }) - - local cmp = require('cmp') - local cmp_lsp = require("cmp_nvim_lsp") - local capabilities = vim.tbl_deep_extend( - "force", - {}, - vim.lsp.protocol.make_client_capabilities(), - cmp_lsp.default_capabilities()) - - require("mason").setup() - require("mason-lspconfig").setup({ - automatic_installation = false, - ensure_installed = { - "lua_ls", - "rust_analyzer", - "tinymist", - }, - handlers = { - function(server_name) - require("lspconfig")[server_name].setup { - capabilities = capabilities - } - end, - ["svelte"] = function() - require("lspconfig")["svelte"].setup({ - capabilities = capabilities, - on_attach = function(client, bufnr) - vim.api.nvim_create_autocmd("BufWritePost", { - pattern = { "*.js", "*.ts" }, - callback = function(ctx) - -- this bad boy updates imports between svelte and ts/js files - client.notify("$/onDidChangeTsOrJsFile", { uri = ctx.match }) - end, - }) - end - }) - end, - ["tinymist"] = function() - require("lspconfig")["tinymist"].setup { - capabilities = capabilities, - settings = { - formatterMode = "typstyle", - exportPdf = "never" - }, - } - end, - ["lua_ls"] = function() - local lspconfig = require("lspconfig") - lspconfig.lua_ls.setup { - capabilities = capabilities, - settings = { - Lua = { - runtime = { version = "Lua 5.1" }, - diagnostics = { - globals = { "bit", "vim", "it", "describe", "before_each", "after_each" }, - } - } - } - } - end - } - - }) - local l = vim.lsp - l.handlers["textDocument/hover"] = function(_, result, ctx, config) - config = config or { border = "rounded", focusable = true } - config.focus_id = ctx.method - if not (result and result.contents) then - return - end - local markdown_lines = l.util.convert_input_to_markdown_lines(result.contents) - markdown_lines = vim.tbl_filter(function(line) - return line ~= "" - end, markdown_lines) - if vim.tbl_isempty(markdown_lines) then - return - end - return l.util.open_floating_preview(markdown_lines, "markdown", config) - end - - local cmp_select = { behavior = cmp.SelectBehavior.Select } - vim.api.nvim_set_hl(0, "CmpNormal", {}) - cmp.setup({ - snippet = { - expand = function(args) - require('luasnip').lsp_expand(args.body) -- For `luasnip` users. - end, - }, - mapping = cmp.mapping.preset.insert({ - ['<C-p>'] = cmp.mapping.select_prev_item(cmp_select), - ['<C-n>'] = cmp.mapping.select_next_item(cmp_select), - ['<C-y>'] = cmp.mapping.confirm({ select = true }), - ['<C-e>'] = vim.NIL - }), - - window = { - completion = { - scrollbar = false, - border = "rounded", - winhighlight = "Normal:CmpNormal", + { + "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" } }, }, - documentation = { - scrollbar = false, - border = "rounded", - winhighlight = "Normal:CmpNormal", - } }, - sources = cmp.config.sources({ - { - name = "nvim_lsp", - entry_filter = function(entry, ctx) - return require("cmp").lsp.CompletionItemKind.Snippet ~= entry:get_kind() - end, - }, - { name = 'cmp-tw2css' }, - }, {}) - }) - - - local autocmd = vim.api.nvim_create_autocmd - autocmd({ "BufEnter", "BufWinEnter" }, { - pattern = { "*.vert", "*.frag" }, - callback = function(e) - vim.cmd("set filetype=glsl") - end - - }) + } + }, - autocmd('LspAttach', { - callback = function(e) - local opts = { buffer = e.buf } - vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts) - vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts) - vim.keymap.set("n", "<leader>lf", vim.lsp.buf.format) - vim.keymap.set("n", "<leader>la", function() vim.lsp.buf.code_action() end, opts) - vim.keymap.set("n", "<leader>lr", function() vim.lsp.buf.rename() end, opts) - vim.keymap.set("n", "<leader>lk", function() vim.diagnostic.open_float() end, opts) - vim.keymap.set("n", "<leader>ln", function() vim.diagnostic.goto_next() end, opts) - vim.keymap.set("n", "<leader>lp", function() vim.diagnostic.goto_prev() end, opts) - end - }) - end + config = function() + -- require("lspconfig").lua_ls.setup() + vim.lsp.enable("html-lsp") + vim.lsp.enable("lua_ls") + -- require("mason").setup() + -- require("mason-lspconfig").setup({ + -- automatic_installation = true, + -- ensure_installed = { + -- "lua_ls", + -- "rust_analyzer", + -- "html-lsp", + -- "clangd", + -- "tinymist", + -- }, + -- + -- }) + -- local l = vim.lsp + end, } diff --git a/.config/nvim/lua/linus/plugins/luasnip.lua b/.config/nvim/lua/linus/plugins/luasnip.lua @@ -1,3 +1,5 @@ +-- Snippet loader +-- https://github.com/L3MON4D3/LuaSnip return { "L3MON4D3/LuaSnip", version = "v2.*", @@ -10,9 +12,6 @@ return { -- ls.setup({ enable_autosnippets = false }) -- end, { silent = false }) -- vim.keymap.set({ "i" }, "<Tab>", function() ls.expand() end, { silent = true }) - vim.keymap.set({ "i" }, "<C-e>", function() ls.expand() end, { silent = true}) - vim.keymap.set({ "i", "s" }, "<C-J>", function() ls.jump(1) end, { silent = true }) - vim.keymap.set({ "i", "s" }, "<C-K>", function() ls.jump(-1) end, { silent = true }) ls.config.setup({ @@ -22,3 +21,9 @@ return { }) end } + +-- keymaps: +-- $HOME/.config/nvim/lua/linus/keys.lua + +-- snippets: +-- $HOME/.config/nvim/lua/linus/snippets diff --git a/.config/nvim/lua/linus/plugins/mason.lua b/.config/nvim/lua/linus/plugins/mason.lua @@ -0,0 +1,60 @@ +-- https://github.com/mason-org/mason.nvim + +-- ~/.config/nvim/lua/plugins/mason.lua +return { + { + "williamboman/mason.nvim", + config = function() + require("mason").setup() + end, + }, + { + "williamboman/mason-lspconfig.nvim", + dependencies = { "williamboman/mason.nvim", "neovim/nvim-lspconfig" }, + config = function() + require("mason-lspconfig").setup({ + ensure_installed = { + "lua_ls", + "pyright", + "tsserver", + }, + automatic_installation = true, + }) + + local lspconfig = require("lspconfig") + + -- Example: configure LSP servers here + local servers = { "lua_ls", "pyright", "tsserver" } + for _, server in ipairs(servers) do + lspconfig[server].setup({}) + end + end, + }, + { + "jay-babu/mason-null-ls.nvim", + dependencies = { + "williamboman/mason.nvim", + "nvimtools/none-ls.nvim", -- formerly "jose-elias-alvarez/null-ls.nvim" + }, + config = function() + require("mason-null-ls").setup({ + ensure_installed = { + "prettier", + "stylua", + "black", + }, + automatic_installation = true, + }) + + local null_ls = require("null-ls") + + null_ls.setup({ + sources = { + null_ls.builtins.formatting.prettier, + null_ls.builtins.formatting.stylua, + null_ls.builtins.formatting.black, + }, + }) + end, + }, +} diff --git a/.config/nvim/lua/linus/plugins/neo-tree.lua b/.config/nvim/lua/linus/plugins/neo-tree.lua @@ -1,41 +0,0 @@ --- lua/plugins/neo-tree.lua -return { - { - "nvim-neo-tree/neo-tree.nvim", - branch = "v3.x", - cmd = "Neotree", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-tree/nvim-web-devicons", -- file icons - "MunifTanjim/nui.nvim", - }, - opts = { - filesystem = { - follow_current_file = true, -- sync tree with open file - use_libuv_file_watcher = true, - }, - window = { - position = "float", - width = 40, - }, - default_component_configs = { - icon = { - folder_closed = "", - folder_open = "", - folder_empty = "", - }, - modified = { symbol = "●" }, - git_status = { - symbols = { - added = "+", -- new file - modified = "~", -- modified file - deleted = "✖", -- deleted file - renamed = "➜", - unstaged = "★", - }, - }, - }, - }, - }, -} - diff --git a/.config/nvim/lua/linus/plugins/neotree.lua b/.config/nvim/lua/linus/plugins/neotree.lua @@ -1,24 +1,44 @@ +-- lua/plugins/neo-tree.lua +-- $HOME/.config/nvim/lua/linus/plugins/neotree.lua return { - "nvim-neo-tree/neo-tree.nvim", - opts = { - filesystem = { - hijack_netrw_behavior = "open_current", -- Keeps Neo-tree from opening automatically + { + "nvim-neo-tree/neo-tree.nvim", + branch = "v3.x", + cmd = "Neotree", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-tree/nvim-web-devicons", -- file icons + "MunifTanjim/nui.nvim", + }, + opts = { + filesystem = { + follow_current_file = true, -- sync tree with open file + use_libuv_file_watcher = true, + }, window = { position = "float", - width = 30, + width = 40, }, - }, - event_handlers = { - { - event = "file_opened", - handler = function() - require("neo-tree.command").execute({ action = "close" }) - end, + default_component_configs = { + icon = { + folder_closed = "", + folder_open = "", + folder_empty = "", + }, + modified = { symbol = "●" }, + git_status = { + symbols = { + added = "+", -- new file + modified = "~", -- modified file + deleted = "✖", -- deleted file + renamed = "➜", + unstaged = "★", + }, + }, }, }, }, - keys = { - { "<leader>e", "<cmd>Neotree toggle float<cr>", desc = "Toggle File Explorer (Float)" }, - { "<leader>E", "<cmd>Neotree focus float<cr>", desc = "Focus File Explorer" }, - }, } + +-- keympas +-- $HOME/.config/nvim/lua/linus/keys.lua diff --git a/.config/nvim/lua/linus/plugins/no-neck-pain.lua b/.config/nvim/lua/linus/plugins/no-neck-pain.lua @@ -1,3 +0,0 @@ -return { - "shortcuts/no-neck-pain.nvim", -} diff --git a/.config/nvim/lua/linus/plugins/rustaceanvim.lua b/.config/nvim/lua/linus/plugins/rustaceanvim.lua @@ -0,0 +1,10 @@ +return { + 'mrcjkb/rustaceanvim', + version = '^6', -- Recommended + lazy = false, -- This plugin is already lazy + ["rust-analyzer"] = { + cargo = { + allFeatures = true, + }, + }, +} diff --git a/.config/nvim/lua/linus/plugins/telescope.lua b/.config/nvim/lua/linus/plugins/telescope.lua @@ -1,4 +1,4 @@ --- lua/plugins/telescope.lua +-- $HOME/.config/nvim/lua/linus/plugins/telescope.lua return { "nvim-telescope/telescope.nvim", @@ -15,12 +15,8 @@ return { }, }, }, - keys = { - { "<leader>ff", "<cmd>Telescope find_files theme=dropdown<cr>", desc = "Find Files" }, - { "<leader>fr", "<cmd>Telescope oldfiles<cr>", desc = "Recent Files" }, - { "<leader>fg", "<cmd>Telescope live_grep<cr>", desc = "Find in Files (Grep)" }, - { "<leader>fw", "<cmd>Telescope grep_string<cr>", desc = "Find Word Under Cursor" }, - { "<leader>ft", "<cmd>Telescope grep_string search=TODO<cr>", desc = "Find TODO/FIXME" }, - {"<leader><space>", "<cmd>Telescope find_files<cr>", { desc = "Find Files" }} - }, + }, } + +-- keymaps: +-- $HOME/.config/nvim/lua/linus/keys.lua diff --git a/.config/nvim/lua/linus/plugins/transparent.lua b/.config/nvim/lua/linus/plugins/transparent.lua @@ -1,16 +0,0 @@ --- lua/plugins/transparent.lua -return { - { - "xiyaowong/transparent.nvim", - lazy = false, -- load immediately to apply transparency - opts = { - extra_groups = { - "NormalFloat", -- make floating windows transparent - "NeoTreeNormal", -- neo-tree window - "NeoTreeNormalNC", -- neo-tree (no focus) - }, - exclude_groups = {}, -- no exclusions, all backgrounds cleared - }, - }, -} - diff --git a/.config/nvim/lua/linus/plugins/treesitter.lua b/.config/nvim/lua/linus/plugins/treesitter.lua @@ -4,10 +4,11 @@ return { config = function() require("nvim-treesitter.configs").setup({ ensure_installed = { - "vimdoc", "javascript", "typescript", "c", "lua", "rust", - "jsdoc", "bash", "typst", "svelte", "python", "glsl" + "c", "lua", "rust", "Markdown", "python", "html", "css", "typst", "bash", + "vimdoc", "javascript", "typescript", + "jsdoc", "svelte", "glsl" }, - sync_install = false, + sync_install = true, auto_install = true, indent = { enable = true diff --git a/.config/nvim/lua/linus/plugins/undotree.lua b/.config/nvim/lua/linus/plugins/undotree.lua @@ -0,0 +1,12 @@ +-- https://github.com/mbbill/undotree +return { + "mbbill/undotree", + config = function() + vim.g.undotree_WindowLayout = 2 + vim.g.undotree_SplitWidth = 40 + vim.g.undotree_SetFocusWhenToggle = 1 + end, +} + +-- keymaps +-- $HOME/.config/nvim/lua/linus/keys.lua diff --git a/.config/nvim/lua/linus/plugins/zen-mode.lua b/.config/nvim/lua/linus/plugins/zen-mode.lua @@ -1,3 +1,4 @@ +-- $HOME/.config/nvim/lua/linus/plugins/zen-mode.lua return { "folke/zen-mode.nvim", opts = { @@ -48,3 +49,5 @@ return { on_close = function() end, }, } +-- keymaps +-- $HOME/.config/nvim/lua/linus/keys.lua diff --git a/.config/zed/prompts/prompts-library-db.0.mdb/data.mdb b/.config/zed/prompts/prompts-library-db.0.mdb/data.mdb Binary files differ. diff --git a/.config/zed/prompts/prompts-library-db.0.mdb/lock.mdb b/.config/zed/prompts/prompts-library-db.0.mdb/lock.mdb Binary files differ. diff --git a/.config/zed/settings.json b/.config/zed/settings.json @@ -0,0 +1,21 @@ +// Zed settings +// +// For information on how to configure Zed, see the Zed +// documentation: https://zed.dev/docs/configuring-zed +// +// To see all of Zed's default settings without changing your +// custom settings, run `zed: open default settings` from the +// command palette (cmd-shift-p / ctrl-shift-p) +{ + "features": { + "edit_prediction_provider": "zed" + }, + "vim_mode": true, + "ui_font_size": 16, + "buffer_font_size": 16, + "theme": { + "mode": "system", + "light": "One Dark", + "dark": "One Dark" + } +} diff --git a/.zshenv b/.zshenv @@ -6,3 +6,4 @@ export LESSHISTFILE="$HOME/.config/less/history" # mv ~/.gitconfig ~/.config/git/config +. "$HOME/.cargo/env"