update
This commit is contained in:
parent
7075421ac1
commit
63c2d25021
3 changed files with 583 additions and 568 deletions
|
|
@ -210,18 +210,18 @@ vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
|
|||
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
|
||||
|
||||
-- need to add filetype for templ lsp to work
|
||||
vim.filetype.add {
|
||||
vim.filetype.add({
|
||||
extension = {
|
||||
templ = "templ",
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
-- [[ Install `lazy.nvim` plugin manager ]]
|
||||
-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
|
||||
local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
vim.fn.system { "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }
|
||||
vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
end ---@diagnostic disable-next-line: undefined-field
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
|
|
@ -298,13 +298,13 @@ require("lazy").setup({
|
|||
require("which-key").setup()
|
||||
|
||||
-- Document existing key chains
|
||||
require("which-key").register {
|
||||
require("which-key").register({
|
||||
["<leader>c"] = { name = "[C]ode", _ = "which_key_ignore" },
|
||||
["<leader>d"] = { name = "[D]ocument", _ = "which_key_ignore" },
|
||||
["<leader>r"] = { name = "[R]ename", _ = "which_key_ignore" },
|
||||
["<leader>s"] = { name = "[S]earch", _ = "which_key_ignore" },
|
||||
["<leader>w"] = { name = "[W]orkspace", _ = "which_key_ignore" },
|
||||
}
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
|
|
@ -331,7 +331,7 @@ require("lazy").setup({
|
|||
-- `cond` is a condition used to determine whether this plugin should be
|
||||
-- installed and loaded.
|
||||
cond = function()
|
||||
return vim.fn.executable "make" == 1
|
||||
return vim.fn.executable("make") == 1
|
||||
end,
|
||||
},
|
||||
{ "nvim-telescope/telescope-ui-select.nvim" },
|
||||
|
|
@ -363,7 +363,7 @@ require("lazy").setup({
|
|||
|
||||
-- [[ Configure Telescope ]]
|
||||
-- See `:help telescope` and `:help telescope.setup()`
|
||||
require("telescope").setup {
|
||||
require("telescope").setup({
|
||||
-- You can put your default mappings / updates / etc. in here
|
||||
-- All the info you're looking for is in `:help telescope.setup()`
|
||||
--
|
||||
|
|
@ -378,14 +378,14 @@ require("lazy").setup({
|
|||
require("telescope.themes").get_dropdown(),
|
||||
},
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
-- Enable telescope extensions, if they are installed
|
||||
pcall(require("telescope").load_extension, "fzf")
|
||||
pcall(require("telescope").load_extension, "ui-select")
|
||||
|
||||
-- See `:help telescope.builtin`
|
||||
local builtin = require "telescope.builtin"
|
||||
local builtin = require("telescope.builtin")
|
||||
vim.keymap.set("n", "<leader>sh", builtin.help_tags, { desc = "[S]earch [H]elp" })
|
||||
vim.keymap.set("n", "<leader>sk", builtin.keymaps, { desc = "[S]earch [K]eymaps" })
|
||||
vim.keymap.set("n", "<leader>sf", builtin.find_files, { desc = "[S]earch [F]iles" })
|
||||
|
|
@ -400,24 +400,24 @@ require("lazy").setup({
|
|||
-- Slightly advanced example of overriding default behavior and theme
|
||||
vim.keymap.set("n", "<leader>/", function()
|
||||
-- You can pass additional configuration to telescope to change theme, layout, etc.
|
||||
builtin.current_buffer_fuzzy_find(require("telescope.themes").get_dropdown {
|
||||
builtin.current_buffer_fuzzy_find(require("telescope.themes").get_dropdown({
|
||||
winblend = 10,
|
||||
previewer = false,
|
||||
})
|
||||
}))
|
||||
end, { desc = "[/] Fuzzily search in current buffer" })
|
||||
|
||||
-- Also possible to pass additional configuration options.
|
||||
-- See `:help telescope.builtin.live_grep()` for information about particular keys
|
||||
vim.keymap.set("n", "<leader>s/", function()
|
||||
builtin.live_grep {
|
||||
builtin.live_grep({
|
||||
grep_open_files = true,
|
||||
prompt_title = "Live Grep in Open Files",
|
||||
}
|
||||
})
|
||||
end, { desc = "[S]earch [/] in Open Files" })
|
||||
|
||||
-- Shortcut for searching your neovim configuration files
|
||||
vim.keymap.set("n", "<leader>sn", function()
|
||||
builtin.find_files { cwd = vim.fn.stdpath "config" }
|
||||
builtin.find_files({ cwd = vim.fn.stdpath("config") })
|
||||
end, { desc = "[S]earch [N]eovim files" })
|
||||
end,
|
||||
},
|
||||
|
|
@ -507,7 +507,11 @@ require("lazy").setup({
|
|||
|
||||
-- Fuzzy find all the symbols in your current workspace
|
||||
-- Similar to document symbols, except searches over your whole project.
|
||||
map("<leader>ws", require("telescope.builtin").lsp_dynamic_workspace_symbols, "[W]orkspace [S]ymbols")
|
||||
map(
|
||||
"<leader>ws",
|
||||
require("telescope.builtin").lsp_dynamic_workspace_symbols,
|
||||
"[W]orkspace [S]ymbols"
|
||||
)
|
||||
|
||||
-- Rename the variable under your cursor
|
||||
-- Most Language Servers support renaming across files, etc.
|
||||
|
|
@ -577,6 +581,11 @@ require("lazy").setup({
|
|||
-- tsserver = {},
|
||||
--
|
||||
|
||||
htmx = {
|
||||
cmd = { "/home/noa/Documents/programming/htmx-lsp/target/debug/htmx-lsp" },
|
||||
filetypes = { "html" },
|
||||
},
|
||||
|
||||
lua_ls = {
|
||||
-- cmd = {...},
|
||||
-- filetypes { ...},
|
||||
|
|
@ -616,13 +625,13 @@ require("lazy").setup({
|
|||
vim.list_extend(ensure_installed, {
|
||||
"stylua", -- Used to format lua code
|
||||
})
|
||||
require("mason-tool-installer").setup { ensure_installed = ensure_installed }
|
||||
require("mason-tool-installer").setup({ ensure_installed = ensure_installed })
|
||||
|
||||
require("mason-lspconfig").setup {
|
||||
require("mason-lspconfig").setup({
|
||||
handlers = {
|
||||
function(server_name)
|
||||
local server = servers[server_name] or {}
|
||||
require("lspconfig")[server_name].setup {
|
||||
require("lspconfig")[server_name].setup({
|
||||
cmd = server.cmd,
|
||||
settings = server.settings,
|
||||
filetypes = server.filetypes,
|
||||
|
|
@ -630,10 +639,10 @@ require("lazy").setup({
|
|||
-- by the server configuration above. Useful when disabling
|
||||
-- certain features of an LSP (for example, turning off formatting for tsserver)
|
||||
capabilities = vim.tbl_deep_extend("force", {}, capabilities, server.capabilities or {}),
|
||||
}
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
|
|
@ -669,7 +678,7 @@ require("lazy").setup({
|
|||
-- Build Step is needed for regex support in snippets
|
||||
-- This step is not supported in many windows environments
|
||||
-- Remove the below condition to re-enable on windows
|
||||
if vim.fn.has "win32" == 1 or vim.fn.executable "make" == 0 then
|
||||
if vim.fn.has("win32") == 1 or vim.fn.executable("make") == 0 then
|
||||
return
|
||||
end
|
||||
return "make install_jsregexp"
|
||||
|
|
@ -690,11 +699,11 @@ require("lazy").setup({
|
|||
-- 'rafamadriz/friendly-snippets',
|
||||
},
|
||||
config = function() -- See `:help cmp`
|
||||
local cmp = require "cmp"
|
||||
local luasnip = require "luasnip"
|
||||
luasnip.config.setup {}
|
||||
local cmp = require("cmp")
|
||||
local luasnip = require("luasnip")
|
||||
luasnip.config.setup({})
|
||||
|
||||
cmp.setup {
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
|
|
@ -706,7 +715,7 @@ require("lazy").setup({
|
|||
-- chosen, you will need to read `:help ins-completion`
|
||||
--
|
||||
-- No, but seriously. Please read `:help ins-completion`, it is really good!
|
||||
mapping = cmp.mapping.preset.insert {
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
-- Select the [n]ext item
|
||||
["<C-n>"] = cmp.mapping.select_next_item(),
|
||||
-- Select the [p]revious item
|
||||
|
|
@ -715,12 +724,12 @@ require("lazy").setup({
|
|||
-- Accept ([y]es) the completion.
|
||||
-- This will auto-import if your LSP supports it.
|
||||
-- This will expand snippets if the LSP sent a snippet.
|
||||
["<CR>"] = cmp.mapping.confirm { cmp.ConfirmBehavior.Replace, select = true },
|
||||
["<CR>"] = cmp.mapping.confirm({ cmp.ConfirmBehavior.Replace, select = true }),
|
||||
|
||||
-- Manually trigger a completion from nvim-cmp.
|
||||
-- Generally you don't need this, because nvim-cmp will display
|
||||
-- completions whenever it has completion options available.
|
||||
["<C-Space>"] = cmp.mapping.complete {},
|
||||
["<C-Space>"] = cmp.mapping.complete({}),
|
||||
|
||||
-- Think of <c-l> as moving to the right of your snippet expansion.
|
||||
-- So if you have a snippet that's like:
|
||||
|
|
@ -740,13 +749,13 @@ require("lazy").setup({
|
|||
luasnip.jump(-1)
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
},
|
||||
}),
|
||||
sources = {
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
{ name = "path" },
|
||||
},
|
||||
}
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
|
|
@ -760,10 +769,10 @@ require("lazy").setup({
|
|||
priority = 1000, -- make sure to load this before all the other start plugins
|
||||
config = function()
|
||||
-- Load the colorscheme here
|
||||
vim.cmd.colorscheme "tokyonight-night"
|
||||
vim.cmd.colorscheme("tokyonight-night")
|
||||
|
||||
-- You can configure highlights by doing something like
|
||||
vim.cmd.hi "Comment gui=none"
|
||||
vim.cmd.hi("Comment gui=none")
|
||||
end,
|
||||
},
|
||||
|
||||
|
|
@ -779,7 +788,7 @@ require("lazy").setup({
|
|||
-- - va) - [V]isually select [A]round [)]parenthen
|
||||
-- - yinq - [Y]ank [I]nside [N]ext [']quote
|
||||
-- - ci' - [C]hange [I]nside [']quote
|
||||
require("mini.ai").setup { n_lines = 500 }
|
||||
require("mini.ai").setup({ n_lines = 500 })
|
||||
|
||||
-- Add/delete/replace surroundings (brackets, quotes, etc.)
|
||||
--
|
||||
|
|
@ -805,13 +814,13 @@ require("lazy").setup({
|
|||
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
|
||||
|
||||
---@diagnostic disable-next-line: missing-fields
|
||||
require("nvim-treesitter.configs").setup {
|
||||
require("nvim-treesitter.configs").setup({
|
||||
ensure_installed = { "lua" },
|
||||
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
|
||||
auto_install = true,
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
}
|
||||
})
|
||||
|
||||
-- There are additional nvim-treesitter modules that you can use to interact
|
||||
-- with nvim-treesitter. You should go explore a few and see what interests you:
|
||||
|
|
|
|||
36
flake.lock
generated
36
flake.lock
generated
|
|
@ -76,11 +76,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1706830856,
|
||||
"narHash": "sha256-a0NYyp+h9hlb7ddVz4LUn1vT/PLwqfrWYcHMvFB1xYg=",
|
||||
"lastModified": 1709336216,
|
||||
"narHash": "sha256-Dt/wOWeW6Sqm11Yh+2+t0dfEWxoMxGBvv3JpIocFl9E=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "b253292d9c0a5ead9bc98c4e9a26c6312e27d69f",
|
||||
"rev": "f7b3c975cf067e56e7cda6cb098ebe3fb4d74ca2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -154,11 +154,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709485962,
|
||||
"narHash": "sha256-rmFB4uE10+LJbcVE4ePgiuHOBlUIjQOeZt4VQVJTU8M=",
|
||||
"lastModified": 1709710941,
|
||||
"narHash": "sha256-4FjuX5kGQhvrxkwuB3tAcA7cqNgNW10eZ7qzePfl+kM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "d579633ff9915a8f4058d5c439281097e92380a8",
|
||||
"rev": "3c7bacf1d42e533299c5e3baf74556a0e0ac3d0e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -175,11 +175,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1708988456,
|
||||
"narHash": "sha256-RCz7Xe64tN2zgWk+MVHkzg224znwqknJ1RnB7rVqUWw=",
|
||||
"lastModified": 1709578243,
|
||||
"narHash": "sha256-hF96D+c2PBmAFhymMw3z8hou++lqKtZ7IzpFbYeL1/Y=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "1d085ea4444d26aa52297758b333b449b2aa6fca",
|
||||
"rev": "23ff9821bcaec12981e32049e8687f25f11e5ef3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -215,11 +215,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709001452,
|
||||
"narHash": "sha256-FnZ54wkil54hKvr1irdKic1TE27lHQI9dKQmOJRrtlU=",
|
||||
"lastModified": 1709554374,
|
||||
"narHash": "sha256-1yYgwxBzia+QrOaQaZ6YKqGFfiQcSBwYLzd9XRsRLQY=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "6c06334f0843c7300d1678726bb607ce526f6b36",
|
||||
"rev": "daa03606dfb5296a22e842acb02b46c1c4e9f5e7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -230,11 +230,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1709237383,
|
||||
"narHash": "sha256-cy6ArO4k5qTx+l5o+0mL9f5fa86tYUX3ozE1S+Txlds=",
|
||||
"lastModified": 1709479366,
|
||||
"narHash": "sha256-n6F0n8UV6lnTZbYPl1A9q1BS0p4hduAv1mGAP17CVd0=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1536926ef5621b09bba54035ae2bb6d806d72ac8",
|
||||
"rev": "b8697e57f10292a6165a20f03d2f42920dfaf973",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -272,11 +272,11 @@
|
|||
"pre-commit-hooks": "pre-commit-hooks"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709549216,
|
||||
"narHash": "sha256-9KX2QB7qo9mISo936dDyiwDTES30y4OvDtM9zpAJLHI=",
|
||||
"lastModified": 1709707473,
|
||||
"narHash": "sha256-Jd/1lBwjTOmkVeNAwIn6JrS26OsPj37qOKTV0HHW5bg=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"rev": "680889ac01df8c2bfcb7a6ac7c850153d13d7b8f",
|
||||
"rev": "1cda3f6df590ffb5719294311748ab686ce66f69",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
|||
|
|
@ -127,6 +127,12 @@
|
|||
portalPackage = pkgs.xdg-desktop-portal-hyprland;
|
||||
};
|
||||
|
||||
programs.nix-ld.enable = true;
|
||||
programs.nix-ld.libraries = with pkgs; [
|
||||
wayland
|
||||
|
||||
];
|
||||
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
|
||||
security.rtkit.enable = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue