feat: fix clipboard

This commit is contained in:
max_richter 2022-02-03 12:34:50 +01:00
parent 89e4ef3149
commit b33502bf54
6 changed files with 144 additions and 40 deletions

View File

@ -25,6 +25,7 @@ if u.has_plugin("cmp") then
g.hidden = true -- unload buffers when hidden
g.filetype = true -- execute autocommands based on filetype
opt.clipboard = {"unnamedplus"}
o.autoread = true
opt.termguicolors = true
@ -85,10 +86,50 @@ if u.has_plugin("cmp") then
)
require("telescope").setup {
pickers = {
find_files = {
hidden = true
}
defaults = {
vimgrep_arguments = {
"rg",
"--color=never",
"--no-heading",
"--with-filename",
"--line-number",
"--column",
"--smart-case"
},
prompt_prefix = "",
selection_caret = " ",
entry_prefix = " ",
initial_mode = "insert",
selection_strategy = "reset",
sorting_strategy = "ascending",
layout_strategy = "horizontal",
layout_config = {
horizontal = {
prompt_position = "top",
preview_width = 0.55,
results_width = 0.8
},
vertical = {
mirror = false
},
width = 0.87,
height = 0.80,
preview_cutoff = 120
},
file_sorter = require("telescope.sorters").get_fuzzy_file,
file_ignore_patterns = {"node_modules"},
generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter,
path_display = {"truncate"},
winblend = 0,
border = {},
borderchars = {"", "", "", "", "", "", "", ""},
color_devicons = true,
use_less = true,
set_env = {["COLORTERM"] = "truecolor"}, -- default = nil,
file_previewer = require("telescope.previewers").vim_buffer_cat.new,
grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new,
qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new
-- Developer configurations: Not meant for general override
}
}

View File

@ -17,29 +17,13 @@ local function on_attach()
vim.api.nvim_buf_map(bufnr, "n", "gs", ":LspOrganize<CR>", {silent = true})
end
local system_name = ""
-- Lua Language Server
if vim.fn.has("mac") == 1 then
system_name = "macOS"
elseif vim.fn.has("unix") == 1 then
system_name = "Linux"
elseif vim.fn.has("win32") == 1 then
system_name = "Windows"
else
print("Unsupported system for sumneko")
end
local sumneko_root_path = "/home/jim/.local/share/lua-language-server"
local sumneko_binary = sumneko_root_path .. "/bin/" .. system_name .. "/lua-language-server"
local runtime_path = vim.split(package.path, ";")
table.insert(runtime_path, "lua/?.lua")
table.insert(runtime_path, "lua/?/init.lua")
lsp.sumneko_lua.setup {
on_attach = on_attach,
capabilities = lsp_status.capabilities,
cmd = {sumneko_binary, "-E", sumneko_root_path .. "/main.lua"},
print(runtime_path)
require "lspconfig".sumneko_lua.setup {
settings = {
Lua = {
runtime = {
@ -50,7 +34,7 @@ lsp.sumneko_lua.setup {
},
diagnostics = {
-- Get the language server to recognize the `vim` global
globals = {"vim", "bufnr", "use"}
globals = {"vim"}
},
workspace = {
-- Make the server aware of Neovim runtime files
@ -67,7 +51,14 @@ lsp.sumneko_lua.setup {
-- Ltex Language Server
lsp.ltex.setup {
ltex = {
language = {"de", "en", "es"}
completionEnabled = true,
language = {"de", "en", "es"},
configurationTarget = {},
statusBarItem = true,
dictionary = {
["de"] = {"~/test.txt"},
["en"] = {"~/test.txt"}
}
}
}

View File

@ -47,7 +47,7 @@ return require("packer").startup(
"folke/trouble.nvim",
requires = "kyazdani42/nvim-web-devicons",
config = function()
require("trouble").setup()
require("trouble").setup {}
end
}

View File

@ -0,0 +1,71 @@
local present, telescope = pcall(require, "telescope")
if not present then
return
end
local default = {
defaults = {
vimgrep_arguments = {
"rg",
"--color=never",
"--no-heading",
"--with-filename",
"--line-number",
"--column",
"--smart-case"
},
prompt_prefix = "",
selection_caret = " ",
entry_prefix = " ",
initial_mode = "insert",
selection_strategy = "reset",
sorting_strategy = "ascending",
layout_strategy = "horizontal",
layout_config = {
horizontal = {
prompt_position = "top",
preview_width = 0.55,
results_width = 0.8
},
vertical = {
mirror = false
},
width = 0.87,
height = 0.80,
preview_cutoff = 120
},
file_sorter = require("telescope.sorters").get_fuzzy_file,
file_ignore_patterns = {"node_modules"},
generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter,
path_display = {"truncate"},
winblend = 0,
border = {},
borderchars = {"", "", "", "", "", "", "", ""},
color_devicons = true,
use_less = true,
set_env = {["COLORTERM"] = "truecolor"}, -- default = nil,
file_previewer = require("telescope.previewers").vim_buffer_cat.new,
grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new,
qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new,
-- Developer configurations: Not meant for general override
buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker
}
}
local M = {}
M.setup = function()
telescope.setup(default)
local extensions = {"themes", "terms"}
pcall(
function()
for _, ext in ipairs(extensions) do
-- telescope.load_extension(ext)
end
end
)
end
return M

View File

@ -1,17 +1,17 @@
local parser_configs = require("nvim-treesitter.parsers").get_parser_configs()
-- local parser_configs = require("nvim-treesitter.parsers").get_parser_configs()
parser_configs.http = {
install_info = {
url = "https://github.com/NTBBloodbath/tree-sitter-http",
files = {"src/parser.c"},
branch = "main"
}
}
-- parser_configs.http = {
-- install_info = {
-- url = "https://github.com/NTBBloodbath/tree-sitter-http",
-- files = {"src/parser.c"},
-- branch = "main"
-- }
-- }
parser_configs.glsl = {
filetype = "vert",
filetypes = {"vert", "frag"}
}
-- parser_configs.glsl = {
-- filetype = "vert",
-- filetypes = {"vert", "frag"}
-- }
require "nvim-treesitter.configs".setup {
indent = {

View File

@ -19,7 +19,6 @@ set $left h
set $down j
set $up k
set $right l
# Your preferred terminal emulator
# Some menus
set $wofi_scripts ~/.config/wofi
@ -192,7 +191,9 @@ exec swayidle -w \
# Note: workspaces can have any name you want, not just numbers.
# We just use 1-10 as the default.
for_window [class="zoom"] floating enable
for_window [title="Zoom Meeting.*"] floating disable
for_window [title="Zoom Meeting.*"] inhibit_idle visible
#
# Layout stuff: