tangled
alpha
login
or
join now
hyl.st
/
helm
2
fork
atom
nix config
2
fork
atom
overview
issues
pulls
pipelines
add support for starpls-bin??
Anish Lakhwara
2 years ago
f7d7d75b
10f66143
+10
-132
2 changed files
expand all
collapse all
unified
split
home
profiles
nvim
config
fnl
conf
lsp.fnl
default.nix
+4
-3
home/profiles/nvim/config/fnl/conf/lsp.fnl
···
4
4
(local lspsaga (require :lspsaga))
5
5
(local cmp (require :cmp))
6
6
(local nvim (require :lib/nvim))
7
7
-
; (local lspfuzzy (require :lspfuzzy))
7
7
+
; (local lspfuzzy (require :lspfuzzy)) ; Not available on Nix
8
8
; (local sg (require :sg))
9
9
; (local lsputil (require :lspconfig/util))
10
10
; (local navic (require :nvim-navic))
···
87
87
:rangeVariableTypes true}
88
88
:on_attach on-attach})
89
89
90
90
-
(local lsps [:nil_ls :terraform_lsp :fennel_ls :tsserver])
90
90
+
(local lsps [:nil_ls :terraform_lsp :fennel_ls :tsserver :starbin])
91
91
(each [index lsp (ipairs lsps)]
92
92
((. (. lspconfig lsp) :setup) {}))
93
93
94
94
; null-ls
95
95
(let [null-ls (require :null-ls)]
96
96
-
(null-ls.setup {:sources [;null-ls.builtins.diagnostics.shellcheck
96
96
+
(null-ls.setup {:sources [; TODO fix these
97
97
+
;null-ls.builtins.diagnostics.shellcheck
97
98
null-ls.builtins.diagnostics.commitlint]}))
98
99
;null-ls.builtins.diagnostics.jsonlint]}))
99
100
;(null-ls.builtins.diagnostics.proselint.with {:filetypes ["vimwiki" "mail"]})]}))
+6
-129
home/profiles/nvim/default.nix
···
1
1
{ pkgs, ... }:
2
2
-
# let
3
3
-
# customPlugins = {
4
4
-
# vim-zettel = pkgs.vimUtils.buildVimPlugin {
5
5
-
# name = "vim-zettel";
6
6
-
# src = pkgs.fetchFromGitHub {
7
7
-
# owner = "michal-h21";
8
8
-
# repo = "vim-zettel";
9
9
-
# rev = "929d90eec62e6f693c2702d2b6f76a93f2f1689d";
10
10
-
# sha256 = "1fzKmknfVlEYwqeXgbKITbb2/PJ023iJyMz6vak3qh4=";
11
11
-
# };
12
12
-
# };
13
13
-
# };
14
14
-
15
15
-
# Thank god I don't use python anymore
16
16
-
# my-python-packages = python-packages: with python-packages; [
17
17
-
# # other python packages you want
18
18
-
# ];
19
19
-
# python-with-my-packages = pkgs.python3.withPackages my-python-packages;
20
20
-
# in
21
21
-
2
2
+
# TODO Need to find a solution to have my own packages?
3
3
+
# Or at least update to recent versions of the packages I do use in nixpkgs
22
4
{
23
5
home.sessionVariables.EDITOR = "nvim";
24
6
home.shellAliases = {
···
47
29
48
30
# extraConfig = ''
49
31
# filetype plugin on
50
50
-
51
32
# set shortmess+=c
52
33
53
34
# " Pasting
···
57
38
58
39
# " lua config
59
40
# lua <<EOF
60
60
-
61
61
-
62
62
-
63
63
-
64
41
# local luasnip = require("luasnip")
65
42
# local lspkind = require("lspkind")
66
43
# local t = function(str)
···
73
50
74
51
75
52
# -- Setup lspconfig
76
76
-
# require("nvim-navic").setup {}
77
77
-
# local navic = require("nvim-navic")
78
78
-
79
79
-
# -- lspsaga, code_action lightbulb is annoying
80
80
-
# local saga = require('lspsaga')
81
81
-
# saga.init_lsp_saga({
82
82
-
# border_style = "rounded",
83
83
-
# code_action_icon = "",
84
84
-
# code_action_num_shortcut = true,
85
85
-
# code_action_lightbulb = {
86
86
-
# enable = false,
87
87
-
# enable_in_insert = false,
88
88
-
# cache_code_action = true,
89
89
-
# sign = true,
90
90
-
# update_time = 150,
91
91
-
# sign_priority = 20,
92
92
-
# virtual_text = false,
93
93
-
# },
94
94
-
# code_action_keys = {
95
95
-
# quit = 'q',
96
96
-
# exec = '<CR>',
97
97
-
# },
98
98
-
# -- show outline
99
99
-
# show_outline = {
100
100
-
# win_position = 'right',
101
101
-
# --set special filetype win that outline window split.like NvimTree neotree
102
102
-
# -- defx, db_ui
103
103
-
# auto_enter = true,
104
104
-
# auto_preview = true,
105
105
-
# virt_text = '┃',
106
106
-
# jump_key = 'o',
107
107
-
# -- auto refresh when change buffer
108
108
-
# auto_refresh = true,
109
109
-
# },
110
110
-
# })
111
111
-
112
112
-
# -- fennel-ls doesn't support gps
113
113
-
# lspconfig['fennel-ls'].setup {
114
114
-
# on_attach = function(client, bufnr)
115
115
-
# format.on_attach(client)
116
116
-
# end,
117
117
-
# capabilities = capabilities,
118
118
-
# }
119
119
-
120
120
-
# -- deprecated pylsp
121
121
-
# -- require('lspconfig').pylsp.setup {
122
122
-
# -- on_attach = function(client, bufnr)
123
123
-
# -- format.on_attach(client)
124
124
-
# -- navic.attach(client, bufnr)
125
125
-
# -- end,
126
126
-
# -- capabilities = capabilities,
127
127
-
# -- settings = {
128
128
-
# -- pylsp = {
129
129
-
# -- configurationSources = { "flake8", "mypy", "black" },
130
130
-
# -- plugins = {
131
131
-
# -- black = {enabled = true},
132
132
-
# -- jedi_signature_help = {enabled = true},
133
133
-
# -- jedi_completion = { include_params = true },
134
134
-
# -- pylsp_mypy={ enabled = true },
135
135
-
# -- pycodestyle={
136
136
-
# -- enabled=true,
137
137
-
# -- ignore={'E501', 'E231'},
138
138
-
# -- maxLineLength=120,
139
139
-
# -- },
140
140
-
# -- },
141
141
-
# -- },
142
142
-
# -- },
143
143
-
# -- }
144
144
-
145
145
-
# -- lualine
146
146
-
# local navic = require("nvim-navic")
147
147
-
# require('lualine').setup {
148
148
-
# options = { theme = 'ayu' },
149
149
-
# sections = {
150
150
-
# lualine_c = {
151
151
-
# 'filename', { navic.get_location, condition=navic.is_available },
152
152
-
# },
153
153
-
# lualine_y = {
154
154
-
# function()
155
155
-
# local msg = 'No Active Lsp'
156
156
-
# local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype')
157
157
-
# local clients = vim.lsp.get_active_clients()
158
158
-
# if next(clients) == nil then
159
159
-
# return msg
160
160
-
# end
161
161
-
# for _, client in ipairs(clients) do
162
162
-
# local filetypes = client.config.filetypes
163
163
-
# if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
164
164
-
# return client.name
165
165
-
# end
166
166
-
# end
167
167
-
# return msg
168
168
-
# end
169
169
-
# },
170
170
-
# lualine_x = {'filetype'}
171
171
-
# }
172
172
-
# }
173
173
-
174
174
-
175
53
# -- zen mode
176
54
# require('zen-mode').setup{
177
55
# window = {
···
216
94
# },
217
95
# }
218
96
# require('twilight').setup{}
219
219
-
220
220
-
221
97
# EOF
98
98
+
# '';
222
99
223
223
-
# '';
224
100
extraPackages = with pkgs; [
225
101
# used to compile tree-sitter grammar
226
102
# python-with-my-packages
···
234
110
gcc
235
111
shellcheck
236
112
proselint
113
113
+
nixfmt
237
114
# statix
238
115
# nodePackages.typescript
239
116
# nodePackages.typescript-language-server
240
117
# luajitPackages.lua-lsp
241
118
fennel-ls
242
242
-
# starpls-bin # TODO find this!!
119
119
+
unstable.starpls-bin
243
120
];
244
121
245
122
plugins = with pkgs.vimPlugins; [
···
264
141
indent-blankline-nvim
265
142
266
143
# Tree sitter
267
267
-
(nvim-treesitter.withPlugins (p: [ p.nix p.clojure p.fennel p.lua p.html p.css p.regex p.supercollider p.beancount p.markdown_inline p.markdown p.glsl p.yaml p.toml p.dockerfile p.json p.go ]))
144
144
+
(nvim-treesitter.withPlugins (p: [ p.nix p.clojure p.fennel p.lua p.html p.css p.regex p.supercollider p.beancount p.markdown_inline p.markdown p.glsl p.yaml p.toml p.dockerfile p.json p.go p.starlark ]))
268
145
nvim-treesitter-context
269
146
nvim-treesitter-textobjects
270
147