aboutsummaryrefslogtreecommitdiff
path: root/.config/nvim
diff options
context:
space:
mode:
authorLuca Matei Pintilie <lucafulger@gmail.com>2022-10-16 13:46:54 +0000
committerLuca Matei Pintilie <lucafulger@gmail.com>2022-10-16 13:46:54 +0000
commit151bb53d85eca60cab0e28f99b0c7e8c1fe0b988 (patch)
tree8caccea354fbf36a7afe1bf5f0be852bb644e244 /.config/nvim
parentc3e28c7ffcf1dc68fef04f541b1302df05d8e30c (diff)
downloaddotfiles-151bb53d85eca60cab0e28f99b0c7e8c1fe0b988.tar
dotfiles-151bb53d85eca60cab0e28f99b0c7e8c1fe0b988.tar.gz
dotfiles-151bb53d85eca60cab0e28f99b0c7e8c1fe0b988.tar.bz2
dotfiles-151bb53d85eca60cab0e28f99b0c7e8c1fe0b988.tar.lz
dotfiles-151bb53d85eca60cab0e28f99b0c7e8c1fe0b988.tar.xz
dotfiles-151bb53d85eca60cab0e28f99b0c7e8c1fe0b988.tar.zst
dotfiles-151bb53d85eca60cab0e28f99b0c7e8c1fe0b988.zip
Add some neovim stuff
Diffstat (limited to '.config/nvim')
-rw-r--r--.config/nvim/lua/general.lua6
-rw-r--r--.config/nvim/lua/keybinds.lua4
-rw-r--r--.config/nvim/lua/lsp.lua2
-rw-r--r--.config/nvim/lua/plugins.lua10
4 files changed, 21 insertions, 1 deletions
diff --git a/.config/nvim/lua/general.lua b/.config/nvim/lua/general.lua
index b7e3cef..088312a 100644
--- a/.config/nvim/lua/general.lua
+++ b/.config/nvim/lua/general.lua
@@ -9,6 +9,12 @@ vim.opt.backupcopy = "yes"
vim.opt.undolevels = 1000
vim.opt.wrap = false
+vim.opt.tabstop = 4
+vim.opt.softtabstop = -1
+vim.opt.shiftwidth = 4
+vim.opt.expandtab = true
+vim.opt.autoindent = true
+
-- Comment the following lines to disable whitespace characters
vim.opt.list = true
vim.opt.listchars:append("space:⋅")
diff --git a/.config/nvim/lua/keybinds.lua b/.config/nvim/lua/keybinds.lua
index 80a058f..8f2de84 100644
--- a/.config/nvim/lua/keybinds.lua
+++ b/.config/nvim/lua/keybinds.lua
@@ -17,8 +17,10 @@ vim.keymap.set("n", "<Leader>n", nt_api.tree.toggle)
vim.keymap.set("n", "<Leader><CR>", vim.lsp.buf.code_action)
vim.keymap.set("n", "<Leader>K", vim.lsp.buf.hover)
vim.keymap.set("n", "<Leader>D", vim.lsp.buf.definition)
+vim.keymap.set("n", "<Leader>R", vim.lsp.buf.references)
vim.keymap.set("n", "<Leader>F", vim.lsp.buf.formatting)
vim.keymap.set("n", "<Leader>d", vim.diagnostic.open_float)
+vim.keymap.set("n", "<Leader>J", vim.lsp.buf.signature_help)
vim.keymap.set("n", "<Leader>f", telescope.find_files)
vim.keymap.set("n", "<Leader><TAB>", telescope.buffers)
@@ -52,5 +54,7 @@ wk.register({
["t"] = "Open terminal";
["s"] = "Save file";
["q"] = "Quit";
+ ["R"] = "Show References";
+ ["J"] = "Signature help";
}, { prefix = "<leader>" });
diff --git a/.config/nvim/lua/lsp.lua b/.config/nvim/lua/lsp.lua
index 11059ff..29ac2de 100644
--- a/.config/nvim/lua/lsp.lua
+++ b/.config/nvim/lua/lsp.lua
@@ -69,6 +69,8 @@ local on_attach = function(client, bufnr)
local inlayhints = require("lsp-inlayhints")
inlayhints.setup()
inlayhints.on_attach(client, bufnr)
+ local lsp_signature = require("lsp_signature")
+ lsp_signature.on_attach({ bind = true }, bufnr)
end
local lsputils = require("lspconfig").util
diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua
index 1f173da..60eebf0 100644
--- a/.config/nvim/lua/plugins.lua
+++ b/.config/nvim/lua/plugins.lua
@@ -57,6 +57,7 @@ local PKGS = {
{ url = "https://github.com/nanotee/sqls.nvim.git" };
{ url = "https://github.com/lvimuser/lsp-inlayhints.nvim.git" };
{ url = "https://github.com/sigmaSd/deno-nvim.git" };
+ { url = "https://github.com/ray-x/lsp_signature.nvim.git" };
-- Dev container
{ url = "https://codeberg.org/esensar/nvim-dev-container.git" };
@@ -129,7 +130,7 @@ local function init_plugins()
-- Available modes: foreground, background
mode = "foreground"; -- Set the display mode.
})
- vim.g.minimap_auto_start = 1
+ vim.g.minimap_auto_start = 0
vim.g.minimap_highlight_range = 1
vim.g.minimap_highlight_search = 1
@@ -177,6 +178,13 @@ local function init_plugins()
})
vim.fn["mkdp#util#install"]()
+ require("nvim-treesitter.configs").setup({
+ ensure_installed = { "javascript"; "typescript"; "lua"; "c_sharp"; "jsonc" };
+ sync_install = false;
+ auto_install = true;
+ highlight = { enable = true; disable = { "markdown"; "yaml"; "sql" } };
+ })
+
end
return {