Home: Update config for new lock
This commit is contained in:
@ -820,6 +820,8 @@ in {
|
||||
};
|
||||
|
||||
# NOTE: This entire thing is rough, I should rewrite...
|
||||
# TODO: Need to rewrite this once lspconfig 3.0 comes around
|
||||
# TODO: LSP servers don't autostart anymore...
|
||||
lspconfig = {
|
||||
name = "lspconfig";
|
||||
pkg = pkgs.vimPlugins.nvim-lspconfig;
|
||||
@ -837,14 +839,17 @@ in {
|
||||
extraOptions = {
|
||||
root_dir.__raw = ''
|
||||
function(fname)
|
||||
return require("lspconfig.util").root_pattern(
|
||||
-- return require("lspconfig.util").root_pattern(
|
||||
return vim.lsp.config.util.root_pattern(
|
||||
"Makefile",
|
||||
"CMakeLists.txt",
|
||||
".clang-format",
|
||||
".clang-tidy"
|
||||
)(fname) or require("lspconfig.util").root_pattern(
|
||||
-- )(fname) or require("lspconfig.util").root_pattern(
|
||||
)(fname) or vim.lsp.config.util.root_pattern(
|
||||
"compile_commands.json"
|
||||
)(fname) or require("lspconfig.util").find_git_ancestor(fname)
|
||||
-- )(fname) or require("lspconfig.util").find_git_ancestor(fname)
|
||||
)(fname) or vim.lsp.config.util.find_git_ancestor(fname)
|
||||
end
|
||||
'';
|
||||
|
||||
@ -941,9 +946,6 @@ in {
|
||||
];
|
||||
in ''
|
||||
function(_, opts)
|
||||
-- Make LspInfo window border rounded
|
||||
require("lspconfig.ui.windows").default_options.border = "rounded"
|
||||
|
||||
local __lspOnAttach = function(client, bufnr)
|
||||
|
||||
-- NOTE: The ltex-extra package needs to be loaded in ltex's onAttach.
|
||||
@ -987,7 +989,8 @@ in {
|
||||
|
||||
for i, server in ipairs(${servers}) do
|
||||
if type(server) == "string" then
|
||||
require("lspconfig")[server].setup(__setup)
|
||||
-- require("lspconfig")[server].setup(__setup)
|
||||
vim.lsp.config(server, __setup)
|
||||
else
|
||||
local options = server.extraOptions
|
||||
|
||||
@ -997,7 +1000,8 @@ in {
|
||||
options = vim.tbl_extend("keep", options, __setup)
|
||||
end
|
||||
|
||||
require("lspconfig")[server.name].setup(options)
|
||||
-- require("lspconfig")[server.name].setup(options)
|
||||
vim.lsp.config(server.name, options)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -834,19 +834,19 @@ _: let
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>tt";
|
||||
action = "<cmd>Trouble diagnostics toggle focus=false win.position=bottom<cr>";
|
||||
action = "<cmd>Trouble diagnostics toggle focus=false win.position=left<cr>";
|
||||
options.desc = "Trouble Diagnostics";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>tD";
|
||||
action = "<cmd>Trouble todo toggle focus=false win.position=bottom<cr>";
|
||||
action = "<cmd>Trouble todo toggle focus=false win.position=left<cr>";
|
||||
options.desc = "Toggle TODOs";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ts";
|
||||
action = "<cmd>Trouble symbols toggle focus=false win.position=right<cr>";
|
||||
action = "<cmd>Trouble symbols toggle focus=false win.position=left<cr>";
|
||||
options.desc = "Trouble Symbols";
|
||||
}
|
||||
{
|
||||
|
||||
@ -10,6 +10,7 @@ _: {
|
||||
formatexpr = "v:lua.require('conform').formatexpr()";
|
||||
laststatus = 3; # Global statusline
|
||||
winblend = 30; # Floating popup transparency
|
||||
winborder = "rounded";
|
||||
sessionoptions = ["buffers" "curdir" "folds" "globals" "help" "skiprtp" "tabpages" "winsize"]; # What should be saved when creating a session
|
||||
showtabline = 2; # Disable tabline with 0, show for > 1 with 1, always show with 2
|
||||
conceallevel = 2;
|
||||
|
||||
Reference in New Issue
Block a user