add rustaceanvim to neovim and change stuff in hypr

This commit is contained in:
Seymur Bagirov 2024-03-10 15:59:42 +04:00
parent 10d78efe47
commit 23fca7ccf3
5 changed files with 56 additions and 37 deletions

View File

@ -9,7 +9,7 @@ exec-once=[workspace 1 silent] steam
exec-once= xembedsniproxy & # for wine system tray
exec-once=solaar --window=hide
exec-once=blueman-applet
exec-once=armcord --enable-features=WaylandWindowDecorations,WebRTCPipeWireCapturer --ozone-platform-hint=wayland & disown
exec-once=gio launch ~/.local/share/applications/vesktop.desktop
exec-once=hypridle
# exec-once=wallengine --screen-root HDMI-A-2 1383845959
# exec-once=/home/themystery/.local/share/JetBrains/Toolbox/bin/jetbrains-toolbox
@ -33,5 +33,5 @@ source = ~/.config/hypr/wallpaper.conf
env = XDG_SESSION_TYPE,wayland
env = WLR_DRM_NO_ATOMIC, 1
env = DOTNET_CLI_TELEMETRY_OPTOUT, true
windowrulev2 = immediate, class:^(overwatch.exe)$
windowrulev2 = immediate, title:^(Overwatch)$
windowrulev2 = immediate, class:^(steam_app_1088710)$

View File

@ -45,6 +45,7 @@
"plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" },
"promise-async": { "branch": "main", "commit": "94f6f03c6c1e2aab551aacdf0c1e597a7269abb6" },
"rainbow-delimiters.nvim": { "branch": "master", "commit": "64b7006a36cec099da7eaeb056c4a27dd5d73342" },
"rustaceanvim": { "branch": "master", "commit": "19f12173ccb7993f86ea26b0e21bbb883c3b86c7" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope.nvim": { "branch": "master", "commit": "2e1e382df42467029b493c143c2e727028140214" },
"trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" },

View File

@ -33,20 +33,19 @@ return {
}
}
dap.configurations.rust = {
{
name = "Rust Debug",
type = "codelldb",
request = "launch",
program = function()
vim.fn.jobstart("cargo build");
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/target/debug", "file")
end,
cwd = "${workspaceFolder}",
stopOnEntry = true,
showDisassembly = "never"
}
}
-- dap.configurations.rust = {
-- {
-- name = "Rust Debug",
-- type = "codelldb",
-- request = "launch",
-- program = function()
-- return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/target/debug", "file")
-- end,
-- cwd = "${workspaceFolder}",
-- stopOnEntry = true,
-- showDisassembly = "never"
-- }
-- }
end

View File

@ -22,6 +22,9 @@ return {
-- extras
"SmiteshP/nvim-navic",
"Decodetalkers/csharpls-extended-lsp.nvim",
-- rust
'mrcjkb/rustaceanvim'
},
config = function()
local lsp = require("lsp-zero")
@ -50,17 +53,17 @@ return {
}
}
})
lsp.configure("rust_analyzer", {
settings = {
["rust-analyzer"] = {
checkOnSave = true,
check = {
command = "clippy"
}
}
}
})
--
-- lsp.configure("rust_analyzer", {
-- settings = {
-- ["rust-analyzer"] = {
-- checkOnSave = true,
-- check = {
-- command = "clippy"
-- }
-- }
-- }
-- })
lsp.set_server_config({
capabilities = {
@ -146,13 +149,14 @@ return {
require("mason").setup({});
require("mason-lspconfig").setup({
ensure_installed = {'tsserver','svelte', 'lua_ls', 'csharp_ls', "rust_analyzer"},
ensure_installed = { 'tsserver', 'svelte', 'lua_ls', 'csharp_ls', 'rust_analyzer' },
handlers = {
lsp.default_setup,
lua_ls = function()
local lua_opts = lsp.nvim_lua_ls()
require('lspconfig').lua_ls.setup(lua_opts)
end,
rust_analyzer = lsp.noop,
}
})
@ -176,5 +180,15 @@ return {
},
})
vim.g.rustaceanvim = {
server = {
capabilities = lsp.get_capabilities(),
on_attach = function()
local bufnr = vim.api.nvim_get_current_buf()
vim.keymap.set("n", "<C-.>", function() vim.cmd.RustLsp('codeAction') end, {silent = true, buffer = bufnr, remap = true})
end
},
}
end
}

View File

@ -0,0 +1,5 @@
return {
'mrcjkb/rustaceanvim',
version = '^4', -- Recommended
ft = { 'rust' },
}