aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/neovim/default.nix71
-rw-r--r--modules/neovim/nvim/lua/config/colorscheme.lua7
-rw-r--r--modules/neovim/nvim/lua/config/lsp/init.lua20
-rw-r--r--modules/neovim/nvim/lua/config/settings.lua1
4 files changed, 76 insertions, 23 deletions
diff --git a/modules/neovim/default.nix b/modules/neovim/default.nix
index 7939f0d..4acac91 100644
--- a/modules/neovim/default.nix
+++ b/modules/neovim/default.nix
@@ -106,6 +106,7 @@ in
nvim-treesitter-parsers.systemverilog
nvim-treesitter-parsers.prolog
+
nvim-lspconfig
{
@@ -118,7 +119,8 @@ in
}
# colorschemes. TODO: delete
- base16-nvim
+ # base16-nvim
+ tinted-nvim
{
plugin = nvim-highlight-colors;
@@ -154,22 +156,39 @@ in
tmux-nvim
nvim-lspconfig
+ {
+ plugin = indent-blankline-nvim;
+ optional = false;
+ type = "lua";
+ config =
+ # lua
+ ''
+ require('ibl').setup({
+ indent = {
+ char = '▏',
+ },
+ scope = { enabled = false },
+ })
+ '';
+ }
+ telescope-ui-select-nvim
{
plugin = telescope-nvim;
- optional = true;
+ optional = false;
type = "lua";
config =
# lua
''
- require("lz.n").load({
- "telescope.nvim",
- cmd = "Telescope",
- after = function()
+ -- require("lz.n").load({
+ -- "telescope.nvim",
+ -- cmd = "Telescope",
+ -- after = function()
require('telescope').setup({})
require('telescope').load_extension('fzf')
- end,
- })
+ require('telescope').load_extension('ui-select')
+ -- end,
+ -- })
'';
}
telescope-fzf-native-nvim
@@ -233,9 +252,41 @@ in
'';
}
];
- extraLuaConfig = ''
+ extraLuaConfig =
+ # lua
+ ''
${builtins.readFile ./nvim/init.lua}
- vim.cmd[[colorscheme ${scheme.name}]]
+ require('tinted-colorscheme').setup({
+ base00 = "${scheme.base00}",
+ base01 = "${scheme.base01}",
+ base02 = "${scheme.base02}",
+ base03 = "${scheme.base03}",
+ base04 = "${scheme.base04}",
+ base05 = "${scheme.base05}",
+ base06 = "${scheme.base06}",
+ base07 = "${scheme.base07}",
+ base08 = "${scheme.base08}",
+ base09 = "${scheme.base09}",
+ base0A = "${scheme.base0A}",
+ base0B = "${scheme.base0B}",
+ base0C = "${scheme.base0C}",
+ base0D = "${scheme.base0D}",
+ base0E = "${scheme.base0E}",
+ base0F = "${scheme.base0F}",
+ base10 = "${scheme.base10}",
+ base11 = "${scheme.base11}",
+ base12 = "${scheme.base12}",
+ base13 = "${scheme.base13}",
+ base14 = "${scheme.base14}",
+ base15 = "${scheme.base15}",
+ base16 = "${scheme.base16}",
+ base17 = "${scheme.base17}",
+ }, {
+ supports = { tinty = false, live_reload = false },
+ highlights = { telescope_borders = true },
+ })
+ vim.cmd[[doautocmd ColorScheme]]
+
vim.opt.runtimepath:prepend('${tsparsers}')
'';
};
diff --git a/modules/neovim/nvim/lua/config/colorscheme.lua b/modules/neovim/nvim/lua/config/colorscheme.lua
index 7a4a966..553276f 100644
--- a/modules/neovim/nvim/lua/config/colorscheme.lua
+++ b/modules/neovim/nvim/lua/config/colorscheme.lua
@@ -1,5 +1,6 @@
vim.api.nvim_create_autocmd("ColorScheme", { callback = function(args)
- local colors = require('base16-colorscheme').colors
+ -- local colors = require('base16-colorscheme').colors
+ local colors = require('tinted-colorscheme').colors
vim.api.nvim_set_hl(0, 'FloatBorder', { fg = colors.base01 })
vim.api.nvim_set_hl(0, 'WinSeparator', { fg = colors.base01 })
vim.api.nvim_set_hl(0, 'WinBar', { fg = colors.base03 })
@@ -15,8 +16,8 @@ vim.api.nvim_create_autocmd("ColorScheme", { callback = function(args)
vim.api.nvim_set_hl(0, 'TSLabel', { fg = colors.base0C })
vim.api.nvim_set_hl(0, 'Label', { fg = colors.base0C })
vim.cmd[[
- hi Normal guibg=NONE
- hi NormalNC guibg=NONE
+ "hi Normal guibg=NONE
+ "hi NormalNC guibg=NONE
hi TabLineFill guibg=bg
hi TabLineSel guibg=bg guifg=fg
hi TabLine guibg=bg
diff --git a/modules/neovim/nvim/lua/config/lsp/init.lua b/modules/neovim/nvim/lua/config/lsp/init.lua
index 41ce9f5..0bc21fa 100644
--- a/modules/neovim/nvim/lua/config/lsp/init.lua
+++ b/modules/neovim/nvim/lua/config/lsp/init.lua
@@ -31,7 +31,7 @@ local servers = {
-- rust_analyzer = {}
}
-local orig_util_open_floating_preview = vim.lsp.util.open_floating_preview
+local orig_util_open_floating_preview = vim.lsp.util.open_floating_preview
function vim.lsp.util.open_floating_preview(contents, syntax, opts, ...)
opts = opts or {}
opts.border = opts.border or "rounded"
@@ -66,14 +66,12 @@ vim.api.nvim_create_autocmd("LspAttach", { callback = function(args)
vim.lsp.buf.references()
end, { desc = "Code references (LSP)" })
- vim.keymap.set('n', 'gca', '<cmd>FzfLua lsp_code_actions<CR>', { desc = "Code actions (LSP)" })
-
vim.keymap.set('n', 'gd', function()
vim.lsp.buf.definition()
end, { desc = "Goto definition (LSP)" })
if client:supports_method(methods.textDocument_completion) then
- vim.lsp.completion.enable(true, client.id, args.buf, { autotrigger = false })
+ vim.lsp.completion.enable(true, client.id, args.buf, { autotrigger = true })
map('i', "<CR>", function()
return pumvisible() and '<C-y>' or '<CR>'
@@ -97,10 +95,10 @@ vim.api.nvim_create_autocmd("LspAttach", { callback = function(args)
client.server_capabilities.hoverProvider = false
end
- vim.keymap.set('n', 'E', '<cmd>lua vim.lsp.buf.hover()<CR>', { silent = true })
- -- if client:supports_method(methods.textDocument_inlayHint) then
- -- vim.lsp.inlay_hint.enable()
- -- end
+ -- vim.keymap.set('n', 'E', '<cmd>lua vim.lsp.buf.hover()<CR>', { silent = true })
+ if client:supports_method(methods.textDocument_inlayHint) then
+ vim.lsp.inlay_hint.enable()
+ end
-- if client:supports_method(methods.textDocument_formatting) then
-- vim.api.nvim_create_autocmd("BufWritePre", {
@@ -112,7 +110,7 @@ vim.api.nvim_create_autocmd("LspAttach", { callback = function(args)
-- end
end})
-lspconfig = require('lspconfig')
+-- lspconfig = require('lspconfig')
for server, config in pairs(servers) do
-- -- config.capabilities = require('blink.cmp').get_lsp_capabilities(config.capabilities)
@@ -120,7 +118,9 @@ for server, config in pairs(servers) do
-- -- vim.lsp.config[server] = config
-- -- vim.lsp.enable(server)
-- -- lspconfig.rust_analyzer.setup({})
- lspconfig[server].setup(config)
+ -- lspconfig[server].setup(config)
+ vim.lsp.config[server] = config
+ vim.lsp.enable(server)
end
-- vim.lsp.enable({'lua_ls', 'zls', 'clangd'})
diff --git a/modules/neovim/nvim/lua/config/settings.lua b/modules/neovim/nvim/lua/config/settings.lua
index 061c83a..d209464 100644
--- a/modules/neovim/nvim/lua/config/settings.lua
+++ b/modules/neovim/nvim/lua/config/settings.lua
@@ -17,6 +17,7 @@ vim.o.smd = false
vim.opt.laststatus=0
vim.opt.cmdheight=0
vim.opt.pumheight = 6
+-- vim.opt.pumborder = "rounded"
vim.opt.expandtab = true
vim.o.mouse=""
vim.o.swapfile=false