diff --git a/nvim/ftplugin/swift.lua b/nvim/ftplugin/swift.lua index 5ff1628..35deeb1 100644 --- a/nvim/ftplugin/swift.lua +++ b/nvim/ftplugin/swift.lua @@ -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', '', '!swift build', default_options) +keymap('n', '', '!swift test', default_options) + diff --git a/nvim/lua/config/lsp.lua b/nvim/lua/config/lsp.lua index 7af2a62..45aaa9f 100644 --- a/nvim/lua/config/lsp.lua +++ b/nvim/lua/config/lsp.lua @@ -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} --- } --- } --- } --- } diff --git a/nvim/lua/config/nightfox.lua b/nvim/lua/config/nightfox.lua index f79de10..6f861bd 100644 --- a/nvim/lua/config/nightfox.lua +++ b/nvim/lua/config/nightfox.lua @@ -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 = { diff --git a/nvim/lua/plugins.lua b/nvim/lua/plugins.lua index 0aba8ce..51fe91a 100644 --- a/nvim/lua/plugins.lua +++ b/nvim/lua/plugins.lua @@ -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") diff --git a/nvim/lua/settings.lua b/nvim/lua/settings.lua index 91052be..5b05999 100644 --- a/nvim/lua/settings.lua +++ b/nvim/lua/settings.lua @@ -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 diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index ed657fc..ec30bc4 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -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