summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/user
diff options
context:
space:
mode:
authoryuzu-eva <stevenhu@web.de>2023-10-30 14:11:13 +0100
committeryuzu-eva <stevenhu@web.de>2023-10-30 14:11:13 +0100
commitb423014b0e51a8324e7ff0fb925d7e7c4000cd45 (patch)
tree6f7475db75cbcaa425f6b663b39ac996f152e62d /.config/nvim/lua/user
parent342b7b50d4f95ebf8f17b3696d4f5b9c116e75a8 (diff)
update for new system
Diffstat (limited to '.config/nvim/lua/user')
-rw-r--r--.config/nvim/lua/user/keymaps.lua8
-rw-r--r--.config/nvim/lua/user/options.lua49
-rw-r--r--.config/nvim/lua/user/plugins.lua1
-rw-r--r--.config/nvim/lua/user/plugins/lspconfig.lua51
4 files changed, 53 insertions, 56 deletions
diff --git a/.config/nvim/lua/user/keymaps.lua b/.config/nvim/lua/user/keymaps.lua
index b174f65..777d099 100644
--- a/.config/nvim/lua/user/keymaps.lua
+++ b/.config/nvim/lua/user/keymaps.lua
@@ -2,6 +2,7 @@ local keymap = require 'lib.utils'.keymap
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
+vim.g.tmux_navigator_no_mappings=1
keymap('n', '<leader>Q', ':bufdo bdelete<CR>')
@@ -23,3 +24,10 @@ keymap('i', 'jj', '<Esc>')
keymap('n', '<leader>cd', ':cd %:p:h<CR>:pwd<CR>')
keymap('n', '<leader>E', ':EslintFixAll<CR>')
+
+-- Change tmux-navigator keybinds
+keymap('n', '<C-h>', ':<C-U>TmuxNavigateLeft<cr>')
+keymap('n', '<C-j>', ':<C-U>TmuxNavigateDown<cr>')
+keymap('n', '<C-k>', ':<C-U>TmuxNavigateUp<cr>')
+keymap('n', '<C-l>', ':<C-U>TmuxNavigateRight<cr>')
+keymap('n', '<C-\\>', ':<C-U>TmuxNavigatePrevious<cr>')
diff --git a/.config/nvim/lua/user/options.lua b/.config/nvim/lua/user/options.lua
index 53fbe43..510485f 100644
--- a/.config/nvim/lua/user/options.lua
+++ b/.config/nvim/lua/user/options.lua
@@ -1,24 +1,25 @@
-vim.o.guicursor = 'a:block'
-vim.o.expandtab = true
-vim.o.shiftwidth = 4
-vim.o.tabstop = 4
-vim.o.signcolumn = 'yes:2'
-vim.o.relativenumber = true
-vim.o.number = true
-vim.o.termguicolors = true
-vim.o.ignorecase = true
-vim.o.smartcase = true
-vim.o.wildmode = 'longest:full,full'
-vim.o.wrap = false
-vim.o.scrolloff = 8
-vim.o.sidescrolloff = 8
-vim.o.cursorline = 1
-vim.o.splitright = 1
-vim.o.splitbelow = 1
-vim.o.clipboard = 'unnamedplus' -- Use Linux system clipboard
-vim.o.updatetime = 250 -- Decrease CursorHold delay
-vim.o.redrawtime = 10000 -- Allow more time for loading syntax
-vim.o.foldmethod = "expr"
-vim.o.foldlevelstart = 10
-vim.o.foldexpr = "nvim_treesitter#foldexpr()"
-vim.o.hlsearch = 0
+vim.o.guicursor='a:block'
+vim.o.expandtab=true
+vim.o.shiftwidth=4
+vim.o.softtabstop=4
+vim.o.tabstop=4
+vim.o.signcolumn='yes:2'
+vim.o.relativenumber=true
+vim.o.number=true
+vim.o.termguicolors=true
+vim.o.ignorecase=true
+vim.o.smartcase=true
+vim.o.wildmode='longest:full,full'
+vim.o.wrap=false
+vim.o.scrolloff=8
+vim.o.sidescrolloff=8
+vim.o.cursorline=true
+vim.o.splitright=true
+vim.o.splitbelow=true
+vim.o.clipboard='unnamedplus'
+vim.o.updatetime=250
+vim.o.redrawtime=10000
+vim.o.foldmethod="expr"
+vim.o.foldlevelstart=10
+vim.o.foldexpr="nvim_treesitter#foldexpr()"
+vim.o.hlsearch=false
diff --git a/.config/nvim/lua/user/plugins.lua b/.config/nvim/lua/user/plugins.lua
index 07f8f42..ae21e4f 100644
--- a/.config/nvim/lua/user/plugins.lua
+++ b/.config/nvim/lua/user/plugins.lua
@@ -3,7 +3,6 @@ require('packer').startup(function()
use { 'tpope/vim-commentary' }
use { 'tpope/vim-surround' }
use { 'tpope/vim-eunuch' }
- use { 'tpope/vim-sleuth' }
use { 'christoomey/vim-tmux-navigator' }
use {
diff --git a/.config/nvim/lua/user/plugins/lspconfig.lua b/.config/nvim/lua/user/plugins/lspconfig.lua
index 39f27c3..67d82a7 100644
--- a/.config/nvim/lua/user/plugins/lspconfig.lua
+++ b/.config/nvim/lua/user/plugins/lspconfig.lua
@@ -59,38 +59,27 @@ require 'lspconfig'.emmet_ls.setup {
filetypes = { 'html', 'javascript', 'typescript', 'javascriptreact', 'typescriptreact', 'eruby' }
}
-local runtime_path = vim.split(package.path, ';')
-table.insert(runtime_path, "lua/?.lua")
-table.insert(runtime_path, "lua/?/init.lua")
-require 'lspconfig'.lua_ls.setup {
- on_attach = on_attach,
- capabilities = capabilities,
- flags = {
- debounce_text_changes = 150,
- },
- cmd = { "/home/cafebabe/.local/share/lua-language-server/bin/lua-language-server", "-E", "/home/cafebabe/.local/share/lua-language-server/bin/main.lua" };
- settings = {
- Lua = {
- runtime = {
- -- Tell language server which version of lua is used.
- version = 'LuaJIT',
- -- Setup lua path
- path = runtime_path,
- },
- diagnostics = {
- -- Recognize globals
- globals = { 'vim', 'use', 'parse' },
- },
- workspace = {
- -- Make server aware of Neovim runtime files
- library = vim.api.nvim_get_runtime_file("", true),
- },
- -- Do not send telemetry data
- telemetry = {
- enable = false,
- },
+require'lspconfig'.lua_ls.setup {
+ on_init = function(client)
+ local path = client.workspace_folders[1].name
+ if not vim.loop.fs_stat(path..'/.luarc.json') and not vim.loop.fs_stat(path..'/.luarc.jsonc') then
+ client.config.settings = vim.tbl_deep_extend('force', client.config.settings.Lua, {
+ runtime = {
+ -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
+ version = 'LuaJIT'
},
- },
+ -- Make the server aware of Neovim runtime files
+ workspace = {
+ library = { vim.env.VIMRUNTIME }
+ -- or pull in all of 'runtimepath'. NOTE: this is a lot slower
+ -- library = vim.api.nvim_get_runtime_file("", true)
+ }
+ })
+
+ client.notify("workspace/didChangeConfiguration", { settings = client.config.settings })
+ end
+ return true
+ end
}
require 'lspconfig'.bashls.setup {