generated from AstroNvim/template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpolish.lua
62 lines (58 loc) · 1.81 KB
/
polish.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
-- This will run last in the setup process and is a good place to configure
-- things like custom filetypes. This just pure lua so anything that doesn't
-- fit in the normal config locations above can go here
-- Set up custom filetypes
-- vim.filetype.add {
-- extension = {
-- foo = "fooscript",
-- },
-- filename = {
-- ["Foofile"] = "fooscript",
-- },
-- pattern = {
-- ["~/%.config/foo/.*"] = "fooscript",
-- },
-- }
-- Autocommands (https://neovim.io/doc/user/autocmd.html)
vim.api.nvim_create_autocmd("BufReadPost", {
callback = function()
local mark = vim.api.nvim_buf_get_mark(0, '"')
local lcount = vim.api.nvim_buf_line_count(0)
if mark[1] > 0 and mark[1] <= lcount then pcall(vim.api.nvim_win_set_cursor, 0, mark) end
end,
})
vim.api.nvim_create_autocmd("FileType", {
pattern = "zsh",
callback = function()
-- let treesitter use bash highlight for zsh files as well
require("nvim-treesitter.highlight").attach(0, "bash")
end,
})
vim.api.nvim_create_autocmd("BufRead", {
-- Force `Jenkinsfile` to groovy filetype.
pattern = { "Jenkinsfile" },
command = "set ft=groovy",
})
-- Attach LSP for Azure Pipelines for YAML files in .azuredevops directory
-- vim.api.nvim_create_autocmd("BufRead", {
-- pattern = "*/.azuredevops/*.y*ml",
-- callback = function()
-- require("astrolsp").setup {
-- opts = {
-- config = {
-- azure_pipelines_ls = {
-- settings = {
-- yaml = {
-- schemas = {
-- ["https://raw.githubusercontent.com/microsoft/azure-pipelines-vscode/master/service-schema.json"] = {
-- "*/.azuredevops/**/*.y*ml",
-- },
-- },
-- },
-- },
-- },
-- },
-- },
-- }
-- end,
-- })