Skip to content

Commit

Permalink
feat: lotta shit
Browse files Browse the repository at this point in the history
  • Loading branch information
willruggiano committed Aug 10, 2023
1 parent 1a7aebd commit 73c4448
Show file tree
Hide file tree
Showing 9 changed files with 110 additions and 41 deletions.
6 changes: 6 additions & 0 deletions nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,12 @@
"rev": "89968a1f8c72427691088e6d09d26a52c2ddc6f4",
"type": "git"
},
"twilight.nvim": {
"branch": "main",
"repo": "git@github.com:folke/twilight.nvim",
"rev": "a4843e6e67092a1e6fa9666f02bf0ab59174c1df",
"type": "git"
},
"vim-dadbod": {
"branch": "master",
"repo": "git@github.com:tpope/vim-dadbod",
Expand Down
28 changes: 28 additions & 0 deletions pkgs/sql-language-server/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
}:
# FIXME: Uses yarn :sigh:
buildNpmPackage rec {
pname = "sql-language-server";
version = "1.6.0";

src = fetchFromGitHub {
owner = "joe-re";
repo = pname;
rev = "v${version}";
hash = "sha256-XPySDZwnAGSPrNXG6mzgnUy24BF9inaiKeJVPpjRnRE=";
};

npmDepsHash = "";

# The prepack script runs the build script, which we'd rather do in the build phase.
npmPackFlags = ["--ignore-scripts"];

meta = with lib; {
description = "SQL Language Server";
homepage = "https://github.com/joe-re/sql-language-server";
license = licenses.gpl3Only;
};
}
2 changes: 0 additions & 2 deletions plugins/bombadil/after/ftplugin/lir.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
vim.opt_local.number = false
vim.opt_local.relativenumber = false
vim.opt_local.signcolumn = "no"
4 changes: 2 additions & 2 deletions plugins/bombadil/plugin/options.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
vim.opt.autoindent = false
vim.opt.autoindent = true
vim.opt.belloff = "all"
vim.opt.breakindent = true
vim.opt.cindent = false
vim.opt.cindent = true
vim.opt.clipboard = "unnamedplus"
vim.opt.cmdheight = 0
vim.opt.conceallevel = 3
Expand Down
4 changes: 2 additions & 2 deletions plugins/cmp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ return function()
{ name = "nvim_lsp" },
{ name = "nvim_lsp_signature_help" },
{ name = "snippy" },
{ name = "copilot" },
-- { name = "copilot" },
}, {
{ name = "path" },
{ name = "buffer" },
}),
sorting = {
priority_weight = 2,
comparators = {
require("copilot_cmp.comparators").prioritize,
-- require("copilot_cmp.comparators").prioritize,
cmp_buffer_locality_comparator,
cmp_fuzzy_path_comparator,
cmp.config.compare.offset,
Expand Down
59 changes: 39 additions & 20 deletions plugins/dap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -108,29 +108,48 @@ return function()

local dapui = require "dapui"
dapui.setup {
sidebar = {
elements = {
{ id = "scopes", size = 0.25 },
{ id = "breakpoints", size = 0.25 },
{ id = "stacks", size = 0.25 },
{ id = "watches", size = 00.25 },
},
size = 50,
position = "left",
},
tray = {
elements = { "repl" },
size = 15,
position = "bottom",
controls = {
element = "repl",
enabled = false,
},
floating = {
max_height = nil,
max_width = nil,
mappings = {
close = { "q", "<Esc>" },
layouts = {
{
elements = {
{
id = "scopes",
size = 0.25,
},
{
id = "breakpoints",
size = 0.25,
},
{
id = "stacks",
size = 0.25,
},
{
id = "watches",
size = 0.25,
},
},
position = "left",
size = 40,
},
{
elements = {
-- {
-- id = "repl",
-- size = 0.5,
-- },
{
id = "console",
size = 1,
},
},
position = "bottom",
size = 10,
},
},
windows = { indent = 1 },
}

dap.listeners.after.event_initialized["dapui_config"] = function()
Expand Down
6 changes: 6 additions & 0 deletions plugins/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,12 @@ return function()
}
end

lspconfig.sqlls.setup {
on_init = on_init,
on_attach = on_attach,
capabilities = updated_capabilities,
}

lspconfig.tsserver.setup {
on_init = on_init,
on_attach = on_attach,
Expand Down
34 changes: 20 additions & 14 deletions plugins/spec.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,20 @@ in rec {
cmp-buffer = {
src = sources.cmp-buffer;
};
cmp_copilot = {
src = sources.copilot-cmp;
config = true;
dependencies = {
copilot = {
src = sources."copilot.lua";
config = {
suggestion.enabled = false;
panel.enabled = false;
};
event = "InsertEnter";
};
};
};
# cmp_copilot = {
# src = sources.copilot-cmp;
# config = true;
# dependencies = {
# copilot = {
# src = sources."copilot.lua";
# config = {
# suggestion.enabled = false;
# panel.enabled = false;
# };
# event = "InsertEnter";
# };
# };
# };
cmp-fuzzy-path = {
src = sources.cmp-fuzzy-path;
dependencies = {
Expand Down Expand Up @@ -283,6 +283,7 @@ in rec {
};
paths = with pkgs; [
(pkgs.callPackage ../pkgs/languagetool-rs {})
# (pkgs.callPackage ../pkgs/sql-language-server {})
actionlint
alejandra
cmake-format
Expand Down Expand Up @@ -535,6 +536,11 @@ in rec {
config = ./toggleterm.lua;
};

twilight = {
src = sources."twilight.nvim";
config = true;
};

which-key = {
src = sources."which-key.nvim";
config = true;
Expand Down
8 changes: 7 additions & 1 deletion plugins/treesitter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ return function()
return n, p
end)()

local use_ts_indent = false
if use_ts_indent then
vim.opt.autoindent = false
vim.opt.cindent = false
end

---@diagnostic disable-next-line: missing-fields
require("nvim-treesitter.configs").setup {
-- NOTE: Parsers are installed by nix.
Expand All @@ -26,7 +32,7 @@ return function()
},

indent = {
enable = true,
enable = use_ts_indent,
},

query_linter = {
Expand Down

0 comments on commit 73c4448

Please sign in to comment.