Compare commits
10 commits
d8f258ef41
...
2d72b3c54b
Author | SHA1 | Date | |
---|---|---|---|
kalmenn | 2d72b3c54b | ||
kalmenn | 2ae15f73e9 | ||
kalmenn | 1f8fa75f33 | ||
kalmenn | 080fc15902 | ||
kalmenn | ccb5af6731 | ||
kalmenn | fd21ca18eb | ||
kalmenn | df8cb4e6c7 | ||
kalmenn | f7206fddcb | ||
kalmenn | 572d406e9e | ||
kalmenn | 570e79b076 |
1
init.lua
1
init.lua
|
@ -20,5 +20,6 @@ require("lazy").setup({ { import = "plugins" } })
|
|||
|
||||
require("sets")
|
||||
require("remaps")
|
||||
require("filetypes")
|
||||
|
||||
vim.notify("starting nvim 🏕️")
|
||||
|
|
|
@ -1,32 +1,33 @@
|
|||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "8ae1dedd988eb56441b7858bd1e8554dfadaa46d" },
|
||||
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
|
||||
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||
"crates.nvim": { "branch": "main", "commit": "8437522d12a8c523da2aee9db2979d070b2ecc33" },
|
||||
"fd": { "branch": "master", "commit": "e117a373a7032f47ab7847e32a187253788ce578" },
|
||||
"feline.nvim": { "branch": "main", "commit": "6cfbe0608d2552a7d947c6f521670b10379fbe42" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "aedcd79811d491b60d0a6577a9c1701063c2a609" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "0954d7730e749d606ddf8d7ae8846848be435d53" },
|
||||
"mason-null-ls.nvim": { "branch": "main", "commit": "a1e19bf9baa86e8a43dd86cf9689ca9f71b4d1da" },
|
||||
"mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" },
|
||||
"neo-tree-diagnostics.nvim": { "branch": "main", "commit": "483019d251c31acd14102bc279f938f98d9a3de6" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "f3941c57ec85d7bdb44fa53fd858fd80f159018f" },
|
||||
"none-ls.nvim": { "branch": "main", "commit": "c10b7be7751aee820a02f2d1fafe76bc316fe223" },
|
||||
"nui.nvim": { "branch": "main", "commit": "35da9ca1de0fc4dda96c2e214d93d363c145f418" },
|
||||
"nvim": { "branch": "main", "commit": "c2034f7b549152e5cc757820426341ea5000bc7a" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "0a1a2aa549da0d2294e072e2d725f02cca32f64e" },
|
||||
"nvim-metals": { "branch": "main", "commit": "d90ea43ded7ec651606b0a533ae9740083436e58" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "5973b617a9a48212e40c5c0a0727ad7c91b27484" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "313d9e7193354c5de7cdb1724f9e2d3f442780b0" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" },
|
||||
"ripgrep": { "branch": "master", "commit": "9b42af96f0143a395b9379b6c761b5625367a3b9" },
|
||||
"fd": { "branch": "master", "commit": "bc6782624ef8d886c267c0f698e3895d9657df0e" },
|
||||
"feline.nvim": { "branch": "main", "commit": "2aa8b757313cc01f7779865bef7c7cc391753bd8" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "035da036e68e509ed158414416c827d022d914bd" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "3f13f080434ac942b150679223d54f5ca91e0d52" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "f3658bfc667df6a0340194a015ac2f31c1e675e0" },
|
||||
"mason-null-ls.nvim": { "branch": "main", "commit": "de19726de7260c68d94691afb057fa73d3cc53e7" },
|
||||
"mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" },
|
||||
"neo-tree-diagnostics.nvim": { "branch": "main", "commit": "e00434c3cf8637bcaf70f65c2b9d82b0cc9bd7dc" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "7aad1bf3f6b849cbf108e02c55ad4d701cb4d33a" },
|
||||
"neodev.nvim": { "branch": "main", "commit": "ce9a2e8eaba5649b553529c5498acb43a6c317cd" },
|
||||
"none-ls.nvim": { "branch": "main", "commit": "88821b67e6007041f43b802f58e3d9fa9bfce684" },
|
||||
"nui.nvim": { "branch": "main", "commit": "cbd2668414331c10039278f558630ed19b93e69b" },
|
||||
"nvim": { "branch": "main", "commit": "a1439ad7c584efb3d0ce14ccb835967f030450fe" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "ce16de5665c766f39c271705b17fff06f7bcb84f" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "ed8b8a15acc441aec669f97d75f2c1f2ac8c8aa5" },
|
||||
"nvim-metals": { "branch": "main", "commit": "4f9bf0c821092f20dd34c1a4ea5b07b0500ff089" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "c1d1b4084ef5239e2671f64d35962d184251aea4" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "beb6367ab8496c9e43f22e0252735fdadae1872d" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "5129a3693c482fcbc5ab99a7706ffc4360b995a0" },
|
||||
"ripgrep": { "branch": "master", "commit": "d922b7ac114c24d6800ae5f79d2967481f380c83" },
|
||||
"rust-tools.nvim": { "branch": "master", "commit": "676187908a1ce35ffcd727c654ed68d851299d3e" },
|
||||
"telescope.nvim": { "branch": "0.1.x", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
|
||||
"undotree": { "branch": "master", "commit": "7df3be7a261ea31b528aa442b494fcb458f3d968" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "e7bf502a6ae492f42a91d231864e25630286319b" }
|
||||
"telescope.nvim": { "branch": "0.1.x", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" },
|
||||
"undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "dac8e5c2d85926df92672bf2afb4fc48656d96c7" }
|
||||
}
|
9
lua/filetypes.lua
Normal file
9
lua/filetypes.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
vim.filetype.add({
|
||||
extension = {
|
||||
typ = function(_, bufnr)
|
||||
vim.bo[bufnr].shiftwidth = 2
|
||||
vim.bo[bufnr].tabstop = 2
|
||||
return "typst"
|
||||
end,
|
||||
},
|
||||
})
|
|
@ -49,13 +49,6 @@ return {
|
|||
|
||||
require("rust-tools").setup({
|
||||
server = {
|
||||
on_attach = function(_, bufnr)
|
||||
local rt = require("rust-tools")
|
||||
-- Hover actions
|
||||
vim.keymap.set("n", "<C-space>", rt.hover_actions.hover_actions, { buffer = bufnr })
|
||||
-- Code action groups
|
||||
vim.keymap.set("n", "<Leader>a", rt.code_action_group.code_action_group, { buffer = bufnr })
|
||||
end,
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
["rust-analyzer"] = {
|
||||
|
|
|
@ -1,5 +1,25 @@
|
|||
--- Automatically set the filetype for all buffers matching a pattern.
|
||||
--- Uses an autocommand under the hood
|
||||
--- @param pattern string|string[] What buffers to match on.
|
||||
--- @see vim.api.nvim_create_autocmd
|
||||
--- @param filetype string The filetype to set for the matching buffers
|
||||
local function bind_filetype(pattern, filetype)
|
||||
vim.api.nvim_create_autocmd({ "BufNewFile", "BufRead" }, {
|
||||
pattern = pattern,
|
||||
callback = function()
|
||||
vim.bo.filetype = filetype
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
return {
|
||||
{ import = "plugins/languages" },
|
||||
{
|
||||
"folke/neodev.nvim",
|
||||
opts = {
|
||||
lspconfig = false,
|
||||
},
|
||||
},
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = {},
|
||||
|
@ -43,6 +63,7 @@ return {
|
|||
vim.keymap.set("n", "<space>f", function()
|
||||
vim.lsp.buf.format({ async = true })
|
||||
end, opts)
|
||||
vim.keymap.set("n", "<C-m>", "<cmd>Telescope lsp_document_symbols<cr>", opts)
|
||||
end,
|
||||
})
|
||||
end,
|
||||
|
@ -50,6 +71,8 @@ return {
|
|||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
local lspconfig = require("lspconfig")
|
||||
|
||||
bind_filetype("*.wgsl", "wgsl")
|
||||
|
||||
require("mason-lspconfig").setup({
|
||||
handlers = {
|
||||
-- default handler
|
||||
|
@ -64,6 +87,7 @@ return {
|
|||
end,
|
||||
["lua_ls"] = function()
|
||||
lspconfig.lua_ls.setup({
|
||||
before_init = require("neodev.lsp").before_init,
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
Lua = {
|
||||
|
|
|
@ -5,7 +5,7 @@ vim.o.relativenumber = true
|
|||
|
||||
-- show hidden characters
|
||||
vim.opt.list = true
|
||||
vim.opt.listchars = { tab = "→ ", trail = "·" }
|
||||
vim.opt.listchars = { tab = "→ ", trail = "•" }
|
||||
|
||||
-- indentation
|
||||
vim.opt.expandtab = true
|
||||
|
|
Loading…
Reference in a new issue