more changes, c# working now?
This commit is contained in:
parent
496bdcc57f
commit
82fd91c691
@ -6,7 +6,7 @@ case $- in
|
||||
esac
|
||||
|
||||
export GOPATH="$HOME/go"
|
||||
export PATH="$HOME/.local/bin:$PATH:$GOPATH/bin:$HOME/scripts:$HOME/.dotnet/"
|
||||
export PATH="$HOME/.local/bin:$PATH:$GOPATH/bin:$HOME/scripts:$HOME/.dotnet/:$HOME/.dotnet/tools/"
|
||||
|
||||
# don't put duplicate lines or lines starting with space in the history.
|
||||
# See bash(1) for more options
|
||||
@ -98,7 +98,11 @@ PROMPT_COMMAND=set_prompt
|
||||
# direnv for go
|
||||
# eval "$(direnv hook bash)"
|
||||
|
||||
# cargo
|
||||
[[ -s "$HOME/.local/share/cargo/env" ]] && source "/home/solomon/.local/share/cargo/env"
|
||||
|
||||
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
|
||||
export SDKMAN_DIR="$HOME/.sdkman"
|
||||
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
|
||||
. "/home/solomon/.local/share/cargo/env"
|
||||
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ cmd open ${{
|
||||
application/vnd.oasis.opendocument.text) lowriter $fs ;;
|
||||
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) localc $fx ;;
|
||||
image/vnd.djvu|application/pdf|application/octet-stream|application/postscript) setsid -f zathura $fx >/dev/null 2>&1 ;;
|
||||
text/*|application/json|inode/x-empty) $EDITOR $fx;;
|
||||
text/*|application/json|application/javascript|inode/x-empty) $EDITOR $fx;;
|
||||
image/x-xcf) setsid -f gimp $f >/dev/null 2>&1 ;;
|
||||
image/svg+xml) display -- $f ;;
|
||||
image/*) rotdir $f | grep -i "\.\(png\|jpg\|jpeg\|gif\|webp\|tif\|ico\)\(_large\)*$" |
|
||||
|
||||
@ -4,9 +4,7 @@ return {
|
||||
event = "InsertEnter",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-path",
|
||||
"hrsh7th/cmp-cmdline",
|
||||
"hrsh7th/cmp-emoji",
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
},
|
||||
@ -33,9 +31,7 @@ return {
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
{ name = "buffer" },
|
||||
{ name = "path" },
|
||||
{ name = "cmdline" },
|
||||
{ name = "emoji" },
|
||||
}),
|
||||
formatting = {
|
||||
|
||||
@ -34,6 +34,7 @@ return {
|
||||
},
|
||||
},
|
||||
ltex = {
|
||||
mason = true,
|
||||
settings = {
|
||||
ltex = {
|
||||
language = "en-AU",
|
||||
@ -41,25 +42,43 @@ return {
|
||||
},
|
||||
},
|
||||
rust_analyzer = {
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
mason = false,
|
||||
cmd = {
|
||||
|
||||
"rustup",
|
||||
"run",
|
||||
"stable",
|
||||
"rust-analyzer",
|
||||
},
|
||||
},
|
||||
omnisharp = {},
|
||||
},
|
||||
setup = {
|
||||
-- additional setup can be added here.
|
||||
omnisharp = function(_, _)
|
||||
require("lazyvim.utils").on_attach(function(client, _)
|
||||
if client.name == "omnisharp" then
|
||||
---@type string[]
|
||||
local tokenModifiers =
|
||||
client.server_capabilities.semanticTokensProvider.legend.tokenModifiers
|
||||
for i, v in ipairs(tokenModifiers) do
|
||||
tokenModifiers[i] = v:gsub(" ", "_")
|
||||
end
|
||||
---@type string[]
|
||||
local tokenTypes = client.server_capabilities.semanticTokensProvider.legend.tokenTypes
|
||||
for i, v in ipairs(tokenTypes) do
|
||||
tokenTypes[i] = v:gsub(" ", "_")
|
||||
end
|
||||
end
|
||||
end)
|
||||
return false
|
||||
end,
|
||||
},
|
||||
},
|
||||
config = function(plugin, opts)
|
||||
config = function(_, opts)
|
||||
local Util = require("lazyvim.utils")
|
||||
-- setup autoformat
|
||||
require("lazyvim.plugins.lsp.format").autoformat = opts.autoformat
|
||||
|
||||
-- setup formatting and keymaps
|
||||
Util.on_attach(function(client, buffer)
|
||||
require("lazyvim.plugins.lsp.format").on_attach(client, buffer)
|
||||
@ -139,37 +158,7 @@ return {
|
||||
end,
|
||||
},
|
||||
|
||||
-- formatters
|
||||
-- {
|
||||
-- "jose-elias-alvarez/null-ls.nvim",
|
||||
-- event = "BufReadPre",
|
||||
-- dependencies = { "mason.nvim" },
|
||||
-- opts = function()
|
||||
-- local nls = require("null-ls")
|
||||
-- return {
|
||||
-- root_dir = require("null-ls.utils").root_pattern(".null-ls-root", ".neoconf.json", "Makefile", ".git"),
|
||||
-- debug = false,
|
||||
-- sources = {
|
||||
-- nls.builtins.formatting.stylua,
|
||||
-- nls.builtins.formatting.prettier.with({
|
||||
-- filetypes = {
|
||||
-- "javascript",
|
||||
-- "typescript",
|
||||
-- "css",
|
||||
-- "scss",
|
||||
-- "html",
|
||||
-- "json",
|
||||
-- "yaml",
|
||||
-- },
|
||||
-- }),
|
||||
-- nls.builtins.formatting.black.with({ extra_args = { "--fast" } }),
|
||||
-- nls.builtins.formatting.bibclean,
|
||||
-- nls.builtins.formatting.beautysh,
|
||||
-- nls.builtins.diagnostics.shellcheck,
|
||||
-- },
|
||||
-- }
|
||||
-- end,
|
||||
-- },
|
||||
-- formatting
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
opts = {
|
||||
@ -178,7 +167,14 @@ return {
|
||||
-- Conform will run multiple formatters sequentially
|
||||
python = { "isort", "black" },
|
||||
-- Use a sub-list to run only the first available formatter
|
||||
javascript = { { "prettierd", "prettier" } },
|
||||
typescript = { { "prettierd", "prettier" } },
|
||||
cs = { "csharpier" },
|
||||
},
|
||||
formatters = {
|
||||
csharpier = {
|
||||
command = "dotnet-csharpier",
|
||||
args = { "--write-stdout" },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -189,13 +185,14 @@ return {
|
||||
cmd = "Mason",
|
||||
keys = { { "<leader>lM", "<cmd>Mason<cr>", desc = "Mason" } },
|
||||
opts = {
|
||||
automatic_istallation = false,
|
||||
ensure_installed = {
|
||||
"stylua",
|
||||
"shellcheck",
|
||||
"shfmt",
|
||||
},
|
||||
},
|
||||
config = function(plugin, opts)
|
||||
config = function(_, opts)
|
||||
require("mason").setup()
|
||||
local mr = require("mason-registry")
|
||||
for _, tool in ipairs(opts.ensure_installed) do
|
||||
@ -206,6 +203,8 @@ return {
|
||||
end
|
||||
end,
|
||||
},
|
||||
|
||||
-- language specific tooling
|
||||
{
|
||||
"simrat39/rust-tools.nvim",
|
||||
opts = {
|
||||
@ -220,5 +219,4 @@ return {
|
||||
},
|
||||
},
|
||||
},
|
||||
require("lazyvim.plugins.lsp.lang.c_sharp"),
|
||||
}
|
||||
|
||||
@ -11,6 +11,7 @@ return {
|
||||
{ "<leader>ff", util.telescope("find_files"), desc = "Find Files (root dir)" },
|
||||
{ "<leader>fF", util.telescope("find_files", { cwd = false }), desc = "Find Files (cwd)" },
|
||||
{ "<leader>fr", "<cmd>Telescope oldfiles<cr>", desc = "Recent" },
|
||||
{ "<leader>fp", "<cmd>Telescope projects<cr>", desc = "Find Projects" },
|
||||
{ "<leader>gc", "<cmd>Telescope git_commits<CR>", desc = "commits" },
|
||||
{ "<leader>gs", "<cmd>Telescope git_status<CR>", desc = "status" },
|
||||
{ "<leader>gb", "<cmd>Telescope git_branches<CR>", desc = "branches" },
|
||||
|
||||
@ -26,7 +26,7 @@ function M.get_root()
|
||||
---@type string[]
|
||||
local roots = {}
|
||||
if path then
|
||||
for _, client in pairs(vim.lsp.get_clients({ bufnr = 0 })) do
|
||||
for _, client in pairs(vim.lsp.get_active_clients({ bufnr = 0 })) do
|
||||
local workspace = client.config.workspace_folders
|
||||
local paths = workspace
|
||||
and vim.tbl_map(function(ws)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user