aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhongheng Liu <z.liu@outlook.com.gr>2024-12-03 22:35:06 +0200
committerZhongheng Liu <z.liu@outlook.com.gr>2024-12-03 22:35:06 +0200
commitb74b1ba3e48cd7c4431b338e8246754feb2e0965 (patch)
tree02ee57eaedd269fcd601e917843aef7945e2bb6f
parent4694410cc83577627dc62a7b41e687eab826386a (diff)
downloadnixos-configuration-b74b1ba3e48cd7c4431b338e8246754feb2e0965.tar.gz
nixos-configuration-b74b1ba3e48cd7c4431b338e8246754feb2e0965.tar.bz2
nixos-configuration-b74b1ba3e48cd7c4431b338e8246754feb2e0965.zip
feat: improve nixvim configuration
-rw-r--r--home-manager/stvnliu/nixvim/cmp.nix32
-rw-r--r--home-manager/stvnliu/nixvim/coq.nix6
-rw-r--r--home-manager/stvnliu/nixvim/default.nix1
-rw-r--r--home-manager/stvnliu/nixvim/lsp.nix4
-rw-r--r--home-manager/stvnliu/nixvim/lspkind.nix12
5 files changed, 39 insertions, 16 deletions
diff --git a/home-manager/stvnliu/nixvim/cmp.nix b/home-manager/stvnliu/nixvim/cmp.nix
index 865859a..5c91e90 100644
--- a/home-manager/stvnliu/nixvim/cmp.nix
+++ b/home-manager/stvnliu/nixvim/cmp.nix
@@ -2,31 +2,37 @@
{
plugins = {
luasnip.enable = true;
+ /*
copilot-lua = {
enable = true;
suggestion.enabled = false;
panel.enabled = false;
};
-
- cmp-buffer = {enable = true;};
-
- cmp-emoji = {enable = true;};
-
- cmp-nvim-lsp = {enable = true;};
-
- cmp-path = {enable = true;};
-
- cmp_luasnip = {enable = true;};
-
+ */
cmp = {
enable = true;
-
settings = {
+ autoEnableSources = true;
+ experimental = {ghost_text = false;};
+ performance = {
+ debounce = 60;
+ fetchingTimeout = 200;
+ maxViewEntries = 30;
+ };
+ snippet = {expand = "luasnip";};
+ cmp-buffer = {enable = true;};
+ cmp-emoji = {enable = true;};
+ cmp-nvim-lsp = {enable = true;};
+ cmp-path = {enable = true;};
+ cmp_luasnip = {enable = true;};
+
+ /*
snippet.expand = ''
function(args)
require('luasnip').lsp_expand(args.body)
end
'';
+ */
sources = [
{name = "nvim_lsp";}
{name = "luasnip";}
@@ -36,9 +42,7 @@
}
{name = "nvim_lua";}
{name = "path";}
- {name = "copilot";}
];
-
formatting = {
fields = ["abbr" "kind" "menu"];
format =
diff --git a/home-manager/stvnliu/nixvim/coq.nix b/home-manager/stvnliu/nixvim/coq.nix
new file mode 100644
index 0000000..fc4388a
--- /dev/null
+++ b/home-manager/stvnliu/nixvim/coq.nix
@@ -0,0 +1,6 @@
+{
+ plugins.coq-nvim = {
+ enable = true;
+ installArtifacts = true;
+ };
+}
diff --git a/home-manager/stvnliu/nixvim/default.nix b/home-manager/stvnliu/nixvim/default.nix
index afe1179..e94d492 100644
--- a/home-manager/stvnliu/nixvim/default.nix
+++ b/home-manager/stvnliu/nixvim/default.nix
@@ -4,6 +4,7 @@
./autosave.nix
./bufferline.nix
./cmp.nix
+ #./coq.nix
./git.nix
./ionide.nix
./lualine.nix
diff --git a/home-manager/stvnliu/nixvim/lsp.nix b/home-manager/stvnliu/nixvim/lsp.nix
index 6b84bb2..cc694ed 100644
--- a/home-manager/stvnliu/nixvim/lsp.nix
+++ b/home-manager/stvnliu/nixvim/lsp.nix
@@ -6,8 +6,8 @@
enable = true;
servers = {
# For Python
- #pylsp.enable = true;
- pylyzer.enable = true;
+ pylsp.enable = true;
+ #pylyzer.enable = true;
#ruff.enable = true;
#ruff_lsp.enable = true;
diff --git a/home-manager/stvnliu/nixvim/lspkind.nix b/home-manager/stvnliu/nixvim/lspkind.nix
new file mode 100644
index 0000000..73f2b1c
--- /dev/null
+++ b/home-manager/stvnliu/nixvim/lspkind.nix
@@ -0,0 +1,12 @@
+{
+ plugins.lspkind = {
+ enable = true;
+ symbolMap = {
+ Copilot = " ";
+ };
+ extraOptions = {
+ maxwidth = 50;
+ ellipsis_char = "...";
+ };
+ };
+}