Compare commits

...

8 Commits

Author SHA1 Message Date
David JULIEN 52bc4efae0
Merge branch 'dev' into venus
system: fix external mode for displayselect
nvim: fix lsp installation dir variable
        format lsp server list
        add rust_analyzer LSP
        add rust config file
2022-12-02 22:32:55 +01:00
David JULIEN 3b0b80cf9c [status] feat: use a branch without sb-battery! 2022-12-02 22:31:07 +01:00
David JULIEN 17e5453287 [nvim] feat: rust config file
format-on-save !
2022-12-02 16:54:40 +01:00
David JULIEN e87b863640 [nvim] feat: add rust_analyzer LSP 2022-12-02 16:17:02 +01:00
David JULIEN c2d120ecf4 [nvim] format: nvim lsp server list 2022-12-02 16:17:02 +01:00
David JULIEN a2ead9f0c0 [nvim] fix: lspconfig require formatting 2022-12-02 16:17:02 +01:00
David JULIEN 47cc2a3694 [nvim] fix: lsp installation dir variable
this is now a global variable
2022-12-02 16:16:32 +01:00
David JULIEN fa919171a2 [system] fix: external mode for displayselect 2022-11-28 11:05:48 +01:00
6 changed files with 43 additions and 9 deletions

View File

@ -0,0 +1,13 @@
-- Author : swytch
-- Created : Thursday Dec. 01, 2022 11:41:26 CET
-- License : GPLv3
-- Description : rust settings file
local format_sync_grp = vim.api.nvim_create_augroup("Format", {})
vim.api.nvim_create_autocmd("BufWritePre", {
pattern = "*.rs",
callback = function()
vim.lsp.buf.format({ timeout_ms = 200 })
end,
group = format_sync_grp,
})

View File

@ -6,8 +6,7 @@
local M = {}
local lsp_root_path = vim.fn.stdpath("data") .. "/lsp_servers/"
local clangd_binary = lsp_root_path .. "clangd/clangd/bin/clangd"
local clangd_binary = _G.lsp_root_dir .. "clangd/clangd/bin/clangd"
M.setup = function(opts)
opts.settings = {

View File

@ -58,7 +58,12 @@ end
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require("cmp_nvim_lsp").default_capabilities(capabilities)
local servers = { "clangd", "sumneko_lua", "texlab" }
local servers = {
"clangd",
"rust_analyzer",
"sumneko_lua",
"texlab",
}
mason.setup({
ui = {
@ -70,6 +75,8 @@ mason.setup({
}
})
_G.lsp_root_dir = vim.fn.stdpath("data") .. "/mason/bin"
mason_lspconfig.setup({
ensure_installed = servers,
})
@ -81,7 +88,7 @@ for _, server in ipairs(servers) do
capabilities = capabilities,
}
local plugin = string.format("%s.%s", "plugin.lsp", server)
local plugin = string.format("plugin.lsp.%s", server)
require(plugin).setup(opts)
lspconfig[server].setup(opts)

View File

@ -0,0 +1,16 @@
-- Author : swytch
-- Created : Wednesday Nov. 30, 2022 16:35:43 CET
-- License : GPLv3
-- Description : neovim lsp config file for rust_analyzer
local M = {}
local rust_analayzer_binary = _G.lsp_root_dir .. "rust_analyzer/rust_analyzer"
M.setup = function(opts)
opts.settings = {}
end
return M

View File

@ -44,10 +44,11 @@ twoscreen() { # If multi-monitor is selected and there are two screens.
}
default() {
primary=$(echo "$allposs" | grep -w "connected primary" | awk '{ print $1 }')
[ -z "$primary" ] && primary=$(echo "$allposs" | grep -w "connected primary" | awk '{ print $1 }')
secondary=$(echo "$screens" | grep -v -w "$primary")
direction="left"
rotation="normal"
setup
}
@ -55,9 +56,7 @@ external() {
internal=$(echo "$screens" | dmenu -i -p "Select internal display:")
screens=$(echo "$screens" | grep -v -w "eDP-1")
primary=$(echo "$screens" | dmenu -i -p "Select primary display:")
xrandr --output $primary --primary
default
xrandr --output $primary --primary && default
}
setup() {

@ -1 +1 @@
Subproject commit 5c9090ae551a08e13201b92d63bcff8110264f23
Subproject commit 8d1f7e2c6acbb82a7aece3587ad8fe797ed272e8