mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-13 22:02:34 +00:00
Nvim and tmux changes
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
local o = vim.opt
|
||||
local keymap = vim.api.nvim_set_keymap
|
||||
local default_options = {noremap = true, silent = true}
|
||||
|
||||
o.tabstop = 2
|
||||
o.softtabstop = 2
|
||||
o.shiftwidth = 2
|
||||
|
||||
keymap('n', '<C-b>', '<cmd>!swift build<CR>', default_options)
|
||||
keymap('n', '<C-T>', '<cmd>!swift test<CR>', default_options)
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
require("mason").setup()
|
||||
require("mason-lspconfig").setup()
|
||||
local nvim_lsp = require("lspconfig")
|
||||
|
||||
-- Use an on_attach function to only map the following keys
|
||||
@@ -143,58 +145,3 @@ for _, lsp in ipairs(servers) do
|
||||
})
|
||||
end
|
||||
|
||||
-- Test source-kit
|
||||
--require'lspconfig'.sourcekit.setup{}
|
||||
|
||||
|
||||
-- local sumneko_root_path = os.getenv("HOME") .. ".cache/lua-language-server"
|
||||
-- local sumneko_binary = "/usr/bin/lua-language-server"
|
||||
-- require"lspconfig".sumneko_lua.setup {
|
||||
-- cmd = {sumneko_binary, "-E", sumneko_root_path .. "/main.lua"},
|
||||
-- capabilities = capabilities,
|
||||
-- on_attach = on_attach,
|
||||
-- settings = {
|
||||
-- Lua = {
|
||||
-- runtime = {version = "LuaJIT", path = vim.split(package.path, ";")},
|
||||
-- completion = {enable = true, callSnippet = "Both"},
|
||||
-- diagnostics = {
|
||||
-- enable = true,
|
||||
-- globals = {"vim", "describe"},
|
||||
-- disable = {"lowercase-global"}
|
||||
-- },
|
||||
-- workspace = {
|
||||
-- library = {
|
||||
-- [vim.fn.expand("$VIMRUNTIME/lua")] = true,
|
||||
-- [vim.fn.expand("$VIMRUNTIME/lua/vim/lsp")] = true,
|
||||
-- [vim.fn.expand("/usr/share/awesome/lib")] = true
|
||||
-- },
|
||||
-- -- adjust these two values if your performance is not optimal
|
||||
-- maxPreload = 2000,
|
||||
-- preloadFileSize = 1000
|
||||
-- },
|
||||
-- telemetry = {enable = false}
|
||||
-- }
|
||||
-- }
|
||||
-- }
|
||||
|
||||
|
||||
-- alternative to formatter but yamlfix is not working and I need this for respecting yamllint config
|
||||
-- but yamlfix is messing up ansible files ... 😠
|
||||
-- require('lspconfig')['efm'].setup{
|
||||
-- filetypes = { 'json', 'yaml','lua' },
|
||||
-- init_options = {documentFormatting = true, codeAction = false},
|
||||
-- settings = {
|
||||
-- rootMarkers = {".git/"},
|
||||
-- languages = {
|
||||
-- lua = {
|
||||
-- {formatCommand = "lua-format -i", formatStdin = true}
|
||||
-- },
|
||||
-- yaml = {
|
||||
-- {formatCommand = "yamlfix -", formatStdin = true}
|
||||
-- },
|
||||
-- json = {
|
||||
-- {formatCommand = "prettier", formatStdin = true}
|
||||
-- }
|
||||
-- }
|
||||
-- }
|
||||
-- }
|
||||
|
||||
@@ -13,7 +13,7 @@ nightfox.setup({
|
||||
match_paren = true, -- inverse the highlighting of match_parens
|
||||
},
|
||||
colors = {
|
||||
--red = "#FF000", -- Override the red color for MAX POWER
|
||||
red = "#FF000", -- Override the red color for MAX POWER
|
||||
--bg_alt = "#000000",
|
||||
},
|
||||
hlgroups = {
|
||||
|
||||
@@ -71,6 +71,8 @@ use {"onsails/lspkind-nvim", requires = {{"famiu/bufdelete.nvim"}}}
|
||||
-- LSP
|
||||
use {"ray-x/lsp_signature.nvim", requires = {{"neovim/nvim-lspconfig"}}}
|
||||
|
||||
use { "williamboman/mason.nvim" }
|
||||
use { "williamboman/mason-lspconfig.nvim" }
|
||||
use {
|
||||
"neovim/nvim-lspconfig",
|
||||
config = get_config("lsp")
|
||||
|
||||
@@ -2,19 +2,14 @@ local o = vim.opt
|
||||
local wo = vim.wo
|
||||
local fn = vim.fn
|
||||
|
||||
-- vim.cmd.filetype('on')
|
||||
-- vim.cmd.filetype.plugin('on')
|
||||
-- vim.cmd.filetype.indent('on')
|
||||
-- vim.cmd.filetype('indent plugin on')
|
||||
vim.cmd.set('inccommand=split')
|
||||
-- o.guicursor = "n-v-c:block,i-ci-ve:ver25,r-cr:hor20,o:hor50" -- block in normal and beam cursor in insert mode
|
||||
o.updatetime = 300 -- faster completion
|
||||
o.timeoutlen = 400 -- time to wait for a mapped sequence to complete (in milliseconds)
|
||||
o.ttimeoutlen = 0 -- Time in milliseconds to wait for a key code sequence to complete
|
||||
o.backup = false -- creates a backup file
|
||||
o.swapfile = false -- enable/disable swap file creation
|
||||
o.dir = fn.stdpath("data") .. "/swp" -- swap file directory
|
||||
o.undofile = true -- enable/disable undo file creation
|
||||
o.undofile = false -- enable/disable undo file creation
|
||||
o.undodir = fn.stdpath("data") .. "/undodir" -- set undo directory
|
||||
o.history = 500 -- Use the 'history' option to set the number of lines from command mode that are remembered.
|
||||
o.hidden = true -- required to keep multiple buffers and open multiple buffers
|
||||
|
||||
@@ -66,7 +66,7 @@ bind -n S-Right next-window
|
||||
|
||||
|
||||
# reload new changes
|
||||
bind-key R source-file ~/.tmux.conf\; \display-message "sorce-file done"
|
||||
bind-key R source-file ~/.tmux.conf\; \display-message "source-file done"
|
||||
|
||||
|
||||
# Create a single default session - because a session is created here, tmux
|
||||
|
||||
Reference in New Issue
Block a user